Lua.pas
Code:
type
lua_CFunction = function(L : Plua_State) : Integer; cdecl;
LuaRegisterCustom, LuaUtils.pas
Code:
procedure LuaRegisterCustom(L: PLua_State; TableIndex: Integer; const Name: PChar; F: lua_CFunction);
var
Count: Integer;
S: string;
begin
LuaProcessTableName(L, Name, S, TableIndex, Count);
LuaRawSetTableFunction(L, TableIndex, S, F);
lua_pop(L, Count);
end;
All my functions are adhering to both call/definition correctly too. :? That's the strange part. I call the register function for the CRT functions I made, commenting out the search routine (I still cannot register it), and the instant they are registered (output isn't even started) that exception occurs and the application dies.
Bookmarks