Here is what I want to do : I want a function in a LUA script to call a C++ function in my GameEngine class.
I cleaned the Gameengine.h file, renamed it to LUAGameEngine.pkg and generated the LUAGameEngine.cpp and LUAGameEngine.h file thanks to this command
Code: Select all
tolua+ -H LUAGameEngine.h -o LUAGameEngine.cpp LUAGameEngine.pkg
here is the generated LUAGameEngine.h
Code: Select all
/*
** Lua binding: LUAGameEngine
** Generated automatically by tolua++-1.0.7 on 06/08/06 07:54:45.
*/
/* Exported function */
TOLUA_API int tolua_LUAGameEngine_open (lua_State* tolua_S);
Code: Select all
tolua_LUAGameEngine_open(scriptmod->getLuaState());
Code: Select all
c:\documents and settings\dave\desktop\workingoutput\source\globalmain\code\luagameengine.h(7) : error C2144: syntax error : 'int' should be preceded by ';'
c:\documents and settings\dave\desktop\workingoutput\source\globalmain\code\luagameengine.h(7) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
I really don't know what to do next... if someone could to a robust tutorial, provide an example or even pinpoint where I'm making a mistake, I''ll be very grateful 'cos this is the last thing standing between me and getting my GUI right