When I run this script:
the following script:
keeps giving me this error:
The error is on the "if" line, more specifically where I try to multiply. The weird thing is, when I reload the script file it works without any problems. I am baffled, any suggestions?
function change_settings (sName, sLine, wildcards)
settings[wildcards[1]] = tonumber(wildcards[2])
end -- function
the following script:
function prompt (sName, sLine, wildcards)
i = 1
repeat
if tonumber (GetVariable ("c_"..healpriority[i])) <
tonumber( GetVariable( "max"..healpriority[i] ) ) * (settings[healpriority[i]]) then
elixbal_aff[healpriority[i]] = hme_cure[healpriority[i]]
i = 3
end -- if
i = i + 1
until i > 3
elixbal_check ()
end -- function
keeps giving me this error:
[string "Script file"]:1644: attempt to perform arithmetic on field '?' (a nil value)
stack traceback:
[string "Script file"]:1644: in function <[string "Script file"]:1622>
The error is on the "if" line, more specifically where I try to multiply. The weird thing is, when I reload the script file it works without any problems. I am baffled, any suggestions?