I'm sure this question has probably been asked before, but I can't seem to find an answer in the usual documentation places.
I've run into a problem where I'm trying to compare two strings (from variables in MUSH), but modifying one with arithmetic.
eg.
function f1 (name, line, wildcards)
local variable1 = GetVariable("variable1")
local variable2 = GetVariable("variable2")
local variable3 = GetVariable("variable3")
if variable1 < 0.85 * variable2 then (here I have a problem, since it says I can't do arithmetic on a string)
Note ("yay!")
end
end -- function
Also, what is the syntax in lua for conditioning on 2 variables? So, as above, but requiring variable3 = 1 as well as variable1 < 0.85 * variable2.
Thanks
I've run into a problem where I'm trying to compare two strings (from variables in MUSH), but modifying one with arithmetic.
eg.
function f1 (name, line, wildcards)
local variable1 = GetVariable("variable1")
local variable2 = GetVariable("variable2")
local variable3 = GetVariable("variable3")
if variable1 < 0.85 * variable2 then (here I have a problem, since it says I can't do arithmetic on a string)
Note ("yay!")
end
end -- function
Also, what is the syntax in lua for conditioning on 2 variables? So, as above, but requiring variable3 = 1 as well as variable1 < 0.85 * variable2.
Thanks