I get this error when I try to use CEGUI from Lua:
../data/packages/123-123/editor.lua:1: error in function 'new'.
argument #1 is 'class CEGUI::Size'; 'CEGUI::MCLGridRef' expected.
The code which gives this is:
local sizeeee = CEGUI.Size(1,0.1);
Is this some problem with tolua used in CEGUI? How can this be fixed?
CEGUI Lua error
Moderators: CEGUI MVP, CEGUI Team
Re: CEGUI Lua error
hkroger wrote:I get this error when I try to use CEGUI from Lua:
../data/packages/123-123/editor.lua:1: error in function 'new'.
argument #1 is 'class CEGUI::Size'; 'CEGUI::MCLGridRef' expected.
The code which gives this is:
local sizeeee = CEGUI.Size(1,0.1);
Is this some problem with tolua used in CEGUI? How can this be fixed?
It should be like this instead:
local sizeeee = CEGUI.Size:new(1,0.1);
Therefore the example in code snippets is not functional.
lindquist wrote:you assign to a local variable so you'll probably want to use new_local (allow garbage collection).
If you don't free it manually you're causing memory leaks.
Actually, I do, thanks.
lindquist wrote:Anyway, I know I have upgraded the tolua++ to a version that fixes this problem, it might just have made it to CVS head though...
Can you be more spesific on the actual problem?
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
It's a bug in tolua++ which was fixed in 1.0.6
http://www.codenix.com/~tolua/
Fixed class constructor bug (it is now possible to use 'ClassName()' to create a lua-owned instance of the class without problems)
http://www.codenix.com/~tolua/
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 3 guests