this is a continuation of this post
http://www.gammon.com.au/forum/bbshowpost.php?id=8747&page=2
your suggestion to use this
worked!
the output comes out as this with char1=Yinn
If I wanted the substitution to occur only on instances like line 2 (basically with a <space> in front of the variable, how do I go about it?
I tried this and it did not work.
Thank you
[EDIT] Fixed formatting
http://www.gammon.com.au/forum/bbshowpost.php?id=8747&page=2
your suggestion to use this
conversions = {
[GetPluginVariable ("", "char1")] = GetPluginVariable ("", "char1").."-[1]",
[GetPluginVariable ("", "char2")] = GetPluginVariable ("", "char2").."-[2]"
}
worked!
the output comes out as this with char1=Yinn
Yinn-[1] barely hits a centipede. ---- line 1
A centipede misses Yinn-[1] with its bite. ---- line 2
If I wanted the substitution to occur only on instances like line 2 (basically with a <space> in front of the variable, how do I go about it?
I tried this and it did not work.
[ " " .. GetPluginVariable("", "char1")] = " " .. GetPluginVariable("", "char1").. "-[1]"
Thank you
[EDIT] Fixed formatting