Tolua throws error on equal op between userdatas
Posted: Fri Jun 18, 2010 06:15
Yesterday I was working on CEGUI lua script, I met this error when comparing two CEGUI windows:
And my script is like this:
When guiWnd is actual equal to oButtonOK, the script works perfect
This error occurs only when guiWnd is different from oButtonOK, e.g. click the oButtonCancel.
I find CEGUI is using Tolua++1.0.92 and has some mod on it. And Tolua++1.0.93 seems to have solved this problem.
But since I am a beginner in Lua
, it is hard to update the Tolua version. So this conclusion is not tested.
Anyone can help?
Code: Select all
"Attempt to perform operation on an invalid operand"
And my script is like this:
Code: Select all
function OnClicked(args)
local guiWnd = CEGUI.toWindowEventArgs(args).window
if guiWnd == oButtonOK then
--TODO: Start scene
elseif guiWnd == oButtonCancel then
--TODO: end scene
end
When guiWnd is actual equal to oButtonOK, the script works perfect
This error occurs only when guiWnd is different from oButtonOK, e.g. click the oButtonCancel.
I find CEGUI is using Tolua++1.0.92 and has some mod on it. And Tolua++1.0.93 seems to have solved this problem.
But since I am a beginner in Lua

Anyone can help?