testvar1 = "FIRED"
tempTrigger("MyPattern", [[echo(]]..testvar1..[[)]])
Why doesn't this work? Ideally I'd like to expand a local variable, but even a global variable doesn't work.
Expand Variable inside of Temp Trigger
Re: Expand Variable inside of Temp Trigger
your tempTrigger concatenates the echo and testvar1 to the following string: [[echo(FIRED)]], which it then executes as code. Since in that string FIRED has no quotes around it, Mudlet thinks it is a variable name, but since it isn't, it actually does echo(nil).
What you thus want is:
testvar1 = "FIRED"
tempTrigger("MyPattern", [[echo("]]..testvar1..[[")]])
What you thus want is:
testvar1 = "FIRED"
tempTrigger("MyPattern", [[echo("]]..testvar1..[[")]])
Re: Expand Variable inside of Temp Trigger
Thanks IO.