Sorry if this is documented / already answered (searched, couldn't find), but I have a custom sequencer command that takes a string as its only parameter. However, the problem I encountered is that all commas are interpreted as delimeters for multiple parameters.
That is, the sequence command UpdateText(Bob, Joe, and Sally went to the store) reads as THREE parameters rather than one, as desired.
Now obviously I could use something like a replacement character like $ and simply replace it as a comma, which isn't much work. But I was curious if the sequencer system as is has support for a literal comma or escape comma character or what have you within sequencer commands.
Thanks
-Erik
Literal commas in string parameters for custom sequencer commands
Re: Literal commas in string parameters for custom sequencer commands
The syntax definition for sequences doesn't allow for literal commas. It was designed for writers who might not easily understand that strings would need to be enclosed in quotes. Two options:
1. Write a regular C# method, register it with Lua, and use it in the Script field.
2. Or concatenate the parameters in your custom sequencer command, such as:
1. Write a regular C# method, register it with Lua, and use it in the Script field.
2. Or concatenate the parameters in your custom sequencer command, such as:
Code: Select all
string s = string.Join(", ", GetParameters());