Version 0.7.7 (Build: Jul 17 2012 Debug Microsoft Windows MSVC++ 10.0 32 bit) ----
Code: Select all
Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
Scripting module is: CEGUI::LuaScriptModule - Official Lua based scripting module for CEGUI ----
Code: Select all
(Error) CEGUI::ScriptException in file c:\dev\cegui-0.7.7\cegui\src\scriptingmodules\luascriptmodule\ceguilua.cpp(686) : Unable to execute Lua script string: 'CEGUI.System:getSingleton()'
[string "CEGUI.System:getSingleton()"]:1: attempt to index global 'CEGUI' (a nil value)
No other errors before this.
Here is the code that is causing the error (assume OGRE has been completely initialized before this)
Code: Select all
CEGUI::OgreRenderer& ogreRenderer = CEGUI::OgreRenderer::create();
CEGUI::OgreImageCodec& ic = ogreRenderer.createOgreImageCodec();
CEGUI::OgreResourceProvider& rsp = ogreRenderer.createOgreResourceProvider();
CEGUI::LuaScriptModule* luaScriptModule = &CEGUI::LuaScriptModule::create();
CEGUI::System::create(ogreRenderer, &rsp, static_cast<CEGUI::XMLParser*>(0), &ic, luaScriptModule);
luaScriptModule->executeString("CEGUI.System:getSingleton()");
Executing standard lua code, like 'print('hello, world!')' works.