CODE
^(\d{1,4})h, (\d{1,4})m \w*-
executes
CODE
SetVariable("currenthealth", %1)
SetVariable("currentmana", %2)
if currenthealth < siphealth and healbalance == "1" then
send("siphealth")
SetVariable("healbalance", 1)
end
SetVariable("currentmana", %2)
if currenthealth < siphealth and healbalance == "1" then
send("siphealth")
SetVariable("healbalance", 1)
end
and I get the error
CODE
[string "Trigger: "]:4: attempt to compare two nil values
stack traceback:
[string "Trigger: "]:4: in main chunk
stack traceback:
[string "Trigger: "]:4: in main chunk
which I think has something to do with the 'if currenthealth < siphealth' but I can't figure out what's wrong. I have siphealth defined via another trigger and currenthealth is defined right at the beginning of this one, so they're not nil values. Obviously, though, I'm doing something wrong. What can I do to make this work?
