LUA Error "wrong argument type" when calling no arg function
Posted: Thu Feb 04, 2010 3:47 am
I am having a minor problem when it comes to creating a function in Lua, and then calling it later.
The general idea is this :
When I try to call createConsole later, all I should have to do is put
But when I do this, I get the following error:
LUA: ERROR running script MiniC (Alias2) ERROR:Lua error:wrong argument type
This doesn't quite make sense to me. The only thing in the alias is "createConsole()".
Any ideas as to why I'm getting an argument error, when the function has no arguments and nothing is attempting to pass any to it? I know this should work, because I have done something similar with another function and there were no errors.
Thanks in advance for any information!
The general idea is this :
Code: Select all
function createConsole()
createMiniConsole("console_test", 100, 100, 100, 100)
setBackgroundColor("console_test", 0, 125, 125)
setMiniConsoleFontSize("console_test", 8)
setWindowWrap("console_test", 40)
setTextFormat("console_test", 0,35,255,50,50,50,0,0,0)
end
Code: Select all
createConsole()
LUA: ERROR running script MiniC (Alias2) ERROR:Lua error:wrong argument type
This doesn't quite make sense to me. The only thing in the alias is "createConsole()".
Any ideas as to why I'm getting an argument error, when the function has no arguments and nothing is attempting to pass any to it? I know this should work, because I have done something similar with another function and there were no errors.
Thanks in advance for any information!