Skip to content

Commit

Permalink
Try to use LUA->RunStringEx
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelIT7 committed Nov 18, 2023
1 parent ddb159f commit b431410
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions source/lua_threaded.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,18 +180,7 @@ LUA_FUNCTION_STATIC(newindex)

void RunString(ILuaInterface* LUA, const char* str)
{
int result = func_luaL_loadstring(LUA->GetState(), str);
Msg("[Code] %i\n", result);
if (result != 0)
{
const char* err = func_lua_tostring(LUA->GetState(), -1, NULL);
LUA->Pop();

Msg("[ERROR] ILuaInterface:RunString: %s\n", err);
return;
}

LUA->PCall(0, LUA_MULTRET, 0);
LUA->RunStringEx("", "", str, true, true, true);
}

LUA_FUNCTION(ILuaInterface_RunString)
Expand Down

0 comments on commit b431410

Please sign in to comment.