Soandso2
Well-known member
- Joined
- Mar 13, 2023
- RedCents
- 937¢
I keep getting:
bad argument #3 to'?' (no value)
in the following function on line 9 (highlighted):
[CODE lang="Lua" highlight="9"]local function checkEndurance()
if me.PctEndurance() < 25 and aSkill == "tc" then
mq.cmd("/autoskill eagle strike")
aSkill = "es"
printf("[%s] \ayEndurance low, switching to Eagle Strike",mq.TLO.Time.Time24())
elseif me.PctEndurance() > 50 and aSkill == "es" then
mq.cmd("/autoskill tiger claw")
aSkill = "tc"
printf("[%s] \ayEndurance over 50%, switching back to Tiger Claw",mq.TLO.Time.Time24())
end
end[/CODE]
but I cant see what is wrong. I removed the first space (between ] and \ay) once and then the function did not break. I thought I had got some strange invisible character in there that for some reason broke everything, but when adding the space back the problem started again. I cant see a difference between the syntax on lines 5 and 9, and line 5 never causes a problem.
bad argument #3 to'?' (no value)
in the following function on line 9 (highlighted):
[CODE lang="Lua" highlight="9"]local function checkEndurance()
if me.PctEndurance() < 25 and aSkill == "tc" then
mq.cmd("/autoskill eagle strike")
aSkill = "es"
printf("[%s] \ayEndurance low, switching to Eagle Strike",mq.TLO.Time.Time24())
elseif me.PctEndurance() > 50 and aSkill == "es" then
mq.cmd("/autoskill tiger claw")
aSkill = "tc"
printf("[%s] \ayEndurance over 50%, switching back to Tiger Claw",mq.TLO.Time.Time24())
end
end[/CODE]
but I cant see what is wrong. I removed the first space (between ] and \ay) once and then the function did not break. I thought I had got some strange invisible character in there that for some reason broke everything, but when adding the space back the problem started again. I cant see a difference between the syntax on lines 5 and 9, and line 5 never causes a problem.
Last edited:



