View Full Version : a12, has something changed in LUA?
birty
April 23rd, 2005, 11:43 AM
my plugin fails with alpha 12 when trying to register it's lua functions. It tries to do it when it recieves the GIRINFO_SCRIPT_STATE_ASYM message from gir_info, is this wrong? it worked with the last version. no exceptions are thown and no error occurs girder simply closes when the luaL_openlib function is called
birty
April 23rd, 2005, 12:22 PM
should it be loading on GIRINFO_SCRIPT_AFTER_START instead (it seems to work)
Ron
April 23rd, 2005, 06:16 PM
Both are the ddefined as the same number. Can you do an uninstall and reinstall Girder? Maybe something is not being updated? I have a ton of plugins that load their lua functions and they seem to work.
Ron
April 23rd, 2005, 06:19 PM
The code I am using:
int WINAPI gir_info(int message, int wparam, int lparam)
{
lua_State *L;
switch ( message )
{
case GIRINFO_SCRIPT_AFTER_STARTED:
L = ( lua_State * ) lparam;
start_server(L);
break;
case GIRINFO_SCRIPT_BEFORE_STOPPED:
L = ( lua_State * ) lparam;
stop_server(L);
break;
}
return GIR_TRUE;
}
Can you make sure that you leave the stack top at 0 after you return?
top = lua_gettop(L);
// load your library here.
lua_settop(L, top);
top should be 0.
birty
April 24th, 2005, 01:56 AM
ok ive made the change, weird that changing from GIRINFO_SCRIPT_STATE_ASYM to GIRINFO_SCRIPT_AFTER_START seemed to fix the error
Ron
April 24th, 2005, 12:46 PM
Maybe the recompile fixed some linker problem
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.