bloodylemming
December 24th, 2021, 23:19
Trying to figure out how to get a return value from a function, so I can do stuff with it.
Here's my test function:
function addThis(a, b)
Debug.chat("The sum is ")
return (a + b)
end
The call...
function onValueChanged()
local x = charManager.addThis(1, 25)
Debug.chat(x)
end
I just get an error and none of my debug info is printed...
Tried it all local, from within the onValueChanged function (minus the charManager pointer) and it worked fine...
I don't know what I'm missing...
Here's my test function:
function addThis(a, b)
Debug.chat("The sum is ")
return (a + b)
end
The call...
function onValueChanged()
local x = charManager.addThis(1, 25)
Debug.chat(x)
end
I just get an error and none of my debug info is printed...
Tried it all local, from within the onValueChanged function (minus the charManager pointer) and it worked fine...
I don't know what I'm missing...