Hello,
I'm trying to do something nifty in Lua, and failing quite miserably. Essentially, I want to create a table of values from a trigger that will examine something called waxlist, and store the wax number, the name of the person who it's of, and the form of the wax. The regexp seems to be fine, because when I finally do type 'waxlist', all hell breaks loose. The trigger:
<triggers>
<trigger
enabled="y"
expand_variables="y"
ignore_case="y"
keep_evaluating="y"
match="^[\d+]?x?\s?"wax(\d+)".*Image: (.*) \((\d+) bondings/?(.*)?\)\.$"
name="waxlist"
omit_from_output="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>waxlist [item] = { wax_id = "wax" .. tonumber( %2 ), name = "%3", bondings = tonumber( %4 ), form = "%5"}
waxlisted = 1
item = item + 1</send>
</trigger>
</triggers>
And the error:
Run-time error
World: Legends2
Immediate execution
[string "Trigger: waxlist"]:1: attempt to concatenate a nil value
stack traceback:
[string "Trigger: waxlist"]:1: in main chunk
I am thoroughly confused as to why this is. Any help would be greatly appreciated. |