Please point me at the help file, or somewhere in the forum to work out how to match strings within lua script. I'd like to do something like;
...stuff...
if %1 == (string.sub (line,1,((string.find (line, ",")-1)))) then
...other stuff...
"line" is a line of text read in via an io function
"%1" is text from an alias or trigger
The point of the whole line is to match part of a line of text up to the first comma against a variable set by an alias, then perform an action.
I can match numbers, but text matching in this form is eludling me.
Fletchling
...stuff...
if %1 == (string.sub (line,1,((string.find (line, ",")-1)))) then
...other stuff...
"line" is a line of text read in via an io function
"%1" is text from an alias or trigger
The point of the whole line is to match part of a line of text up to the first comma against a variable set by an alias, then perform an action.
I can match numbers, but text matching in this form is eludling me.
Fletchling