MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / script_vars_index

Function script_vars_index

ogsr_engine/xrGame/script_vars_storage.cpp:531–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

529}
530
531int script_vars_index(lua_State* L) // чтение переменной из скриптов по строковому индексу
532{
533 CScriptVarsTable* svt = lua_tosvt(L, 1);
534
535 LPCSTR k = lua_tostring(L, 2);
536
537 if (!k || !xr_strlen(k) || !svt)
538 {
539 lua_pushnil(L);
540 return 1;
541 }
542
543 svt->get(L, k, false);
544 return 1;
545}
546
547int script_vars_release(lua_State* L)
548{

Callers

nothing calls this directly

Calls 4

lua_tosvtFunction · 0.85
xr_strlenFunction · 0.50
lua_pushnilFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected