MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / RunCallIn

Method RunCallIn

src/lua/LuaHandle.cpp:307–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305
306
307bool LuaHandle::RunCallIn(int ciCode, int inArgs, int outArgs) {
308 int error;
309
310 error = lua_pcall(L, inArgs, outArgs, 0);
311
312 if (error != 0) {
313 // log the error
314 const std::string* ciName = luaCallInDB.GetName(ciCode);
315 const char* ciNameStr = ciName ? ciName->c_str() : "UNKNOWN";
316 LuaLog(0, "%s::RunCallIn: error = %i, %s, %s\n",
317 GetName().c_str(), error, ciNameStr, lua_tostring(L, -1));
318 // move the error string into CALLIN_ERRORS
319 AddCallInError(L, ciNameStr);
320 return false;
321 }
322
323 return true;
324}
325
326
327//============================================================================//

Callers

nothing calls this directly

Calls 6

LuaLogFunction · 0.85
AddCallInErrorFunction · 0.85
c_strMethod · 0.80
lua_pcallFunction · 0.50
GetNameFunction · 0.50
GetNameMethod · 0.45

Tested by

no test coverage detected