I wrote this function:
And now I'm trying to compare it: canEat () ~= nil
But it just wont work with me. The error message I got speaks of a missing END, to mark the end of the function:
Even though I fail to see how/where the function is lacking a END, I added on in the end, but got this:
I'm guessing there really should be one more END in there, but obviously not in the end of it.. Could anyone with keener LUA-eyes help me out here?
function canEat ()
if bHerb == 1 then
if doHerb == nil then
if aff['anorexia'] ~= 2 then
return 1
else
return 0
end
else
return 0
end
else
return 0
end
endAnd now I'm trying to compare it: canEat () ~= nil
But it just wont work with me. The error message I got speaks of a missing END, to mark the end of the function:
[string "Plugin"]:284: `end' expected (to close `function' at line 237) near `<eof>'Even though I fail to see how/where the function is lacking a END, I added on in the end, but got this:
[string "Plugin"]:239: attempt to call global `canEat' (a nil value)
stack traceback:
[string "Plugin"]:239: in function `curePrompt'I'm guessing there really should be one more END in there, but obviously not in the end of it.. Could anyone with keener LUA-eyes help me out here?