MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / CreateGlobal

Method CreateGlobal

CryScriptSystem/ScriptObject.cpp:120–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120bool CScriptObject::CreateGlobal(CScriptSystem *pScriptSystem, const char *sName)
121{
122 m_pLS=(lua_State *)pScriptSystem->GetScriptHandle();
123 _GUARD_STACK(m_pLS);
124 Detach();
125
126 lua_newtable(m_pLS);
127 Attach();
128 _GET_THIS();
129 lua_setglobal(m_pLS, sName);
130
131 return true;
132}
133
134void CScriptObject::PushBack(int nVal)
135{

Callers 1

CreateGlobalObjectMethod · 0.80

Calls 3

lua_newtableFunction · 0.85
lua_setglobalFunction · 0.85
GetScriptHandleMethod · 0.80

Tested by

no test coverage detected