The error is still clearly pointing at the "==" operator. So change:
hunger == GetVariable ("aaHunger")
to:
hunger = GetVariable ("aaHunger")
As Meerclar already said. Next, your for loop looks fishy, I think you are confusing vbs and Lua here. According to the Lua docs it should be:
Not what you have:
for count == 1 to 2
...
next
So the script should be:
SetVariable ("aaHP", "%1")
SetVariable ("aaMana", "%2")
SetVariable ("aaMove", "%3")
SetVariable ("aaHunger", "%4")
hunger = GetVariable ("aaHunger")
if (hunger == "H") or (hunger == "T") or (hunger == "HT") then
for count=1,2 do
SendImmediate ("drink soup")
end
end
Or better yet:
SetVariable ("aaHP", "%1")
SetVariable ("aaMana", "%2")
SetVariable ("aaMove", "%3")
SetVariable ("aaHunger", "%4")
hunger = "%4"
if (hunger == "H") or (hunger == "T") or (hunger == "HT") then
for count=1,2 do
SendImmediate ("drink soup")
end
end
|