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

Method GetGlobalValue

CryScriptSystem/ScriptSystem.cpp:1566–1580  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

1564//////////////////////////////////////////////////////////////////////
1565//////////////////////////////////////////////////////////////////////
1566bool CScriptSystem::GetGlobalValue(const char *sKey, int &nVal)
1567{
1568 Validate();
1569 lua_getglobal(m_pLS, sKey);
1570 if (lua_isnumber(m_pLS, -1))
1571 {
1572 nVal =(int)(lua_tonumber(m_pLS, 1));
1573 } else
1574 {
1575 lua_pop(m_pLS, 1);
1576 return false;
1577 }
1578 lua_pop(m_pLS, 1);
1579 return true;
1580}
1581
1582//////////////////////////////////////////////////////////////////////
1583//////////////////////////////////////////////////////////////////////

Callers 15

ASEQuery_wantrulesFunction · 0.80
ASEQuery_wantplayersFunction · 0.80
SetScriptValueMethod · 0.80
LoadMusicDataFromLUAMethod · 0.80
EAXPresetMgr.cppFile · 0.80
LoadMethod · 0.80
UpdateParameterMethod · 0.80
LoadMethod · 0.80
OnResetMethod · 0.80
LoadBehaviorsMethod · 0.80
LoadCharactersMethod · 0.80

Calls 7

lua_getglobalFunction · 0.85
lua_isnumberFunction · 0.85
lua_tonumberFunction · 0.85
lua_isstringFunction · 0.85
lua_tostringFunction · 0.85
CryErrorFunction · 0.85
AttachMethod · 0.45

Tested by

no test coverage detected