Topic: variables with "-" character not valid when enclosed with %s? (repost)
Reposting as replies for the original post on this topic were inadvertently crossed with replies for another:
When using the last.fm.plus plug-in, several of the variables it uses contain the "-" character, such as "comment:Songs-DB_Custom1". I often want to use the values from these fields in my script, but whenever I attempt to use them in a function that requires them to be enclosed in % signs, such as $set(testvariable,%comment:Songs-DB_Custom1%), Picard gives me the error message "Unexpected character "-" at position x, line y".
I am currently working around this by using the copy function, which doesn't require % signs, to copy "comment:Songs-DB_Custom1"'s value to a temporary variable named something that does not include the "-" character, then using that temporary variable in the rest of my scripts, the unsetting that temporary variable at the end of my script so it does not get written to the music file itself. An example would be $copy(testvariable,comment:Songs-DB_Custom1).
I've also tried escaping the "-" character in the variable name, such as $set(testvariable,%comment:Songs\-DB_Custom1%), but this doesn't change anything (as I would not really expect it to anyway). Is Picard designed not to accept variable names with "-" in them for some reason?