Hello to you all. It's been a while. I have a new problem that i can't seem to fix.
The MUD output is:
(71) (Assorted) Dried fruit rations
I'm trying to save to a variable the number of Dried fruit rations that i have on the inventory.
That works, but if i send to the MUD "drop dried" it gives the following error:
[string "Trigger: "]:5: bad argument #2 to 'SetVariable' (string expected, got nil)
stack traceback:
[C]: in function 'SetVariable'
[string "Trigger: "]:5: in main chunk
How can i fix this?
Thank you.
<triggers>
<trigger
enabled="y"
match="([^.]+)(\s+)([^.]+) Dried fruit rations"
regexp="y"
send_to="12"
sequence="100"
>
<send>dried = "%1"
first = string.match(dried, "((%d+))")
SetVariable ("dried", first)
</send>
</trigger>
</triggers>
The MUD output is:
(71) (Assorted) Dried fruit rations
I'm trying to save to a variable the number of Dried fruit rations that i have on the inventory.
That works, but if i send to the MUD "drop dried" it gives the following error:
[string "Trigger: "]:5: bad argument #2 to 'SetVariable' (string expected, got nil)
stack traceback:
[C]: in function 'SetVariable'
[string "Trigger: "]:5: in main chunk
How can i fix this?
Thank you.