MCPcopy Create free account
hub / github.com/MergHQ/CRYENGINE / GetParamAny

Method GetParamAny

Code/CryEngine/CryScriptSystem/FunctionHandler.cpp:88–102  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

86
87//////////////////////////////////////////////////////////////////////////
88bool CFunctionHandler::GetParamAny(int nIdx, ScriptAnyValue& any)
89{
90 int nRealIdx = nIdx + m_paramIdOffset;
91 bool bRes = m_pSS->ToAny(any, nRealIdx);
92 if (!bRes)
93 {
94 ScriptVarType paramType = GetParamType(nIdx);
95 const char* sParamType = ScriptVarTypeAsCStr(paramType);
96 const char* sType = ScriptAnyTypeToString(any.type);
97 // Report wrong param.
98 ScriptWarning("[Script Error] Wrong parameter type. Function %s expect parameter %d of type %s (Provided type %s)", m_sFuncName, nIdx, sType, sParamType);
99 m_pSS->LogStackTrace();
100 }
101 return bRes;
102}
103
104//////////////////////////////////////////////////////////////////////////
105int CFunctionHandler::EndFunctionAny(const ScriptAnyValue& any)

Callers 7

AddGameElementMethod · 0.80
RemoveGameElementMethod · 0.80
EventMethod · 0.80
StateValueMethod · 0.80
SetTokenMethod · 0.80
MaterialFlashInvokeMethod · 0.80

Calls 5

ScriptVarTypeAsCStrFunction · 0.85
ScriptWarningFunction · 0.85
ToAnyMethod · 0.80
LogStackTraceMethod · 0.80
ScriptAnyTypeToStringFunction · 0.70

Tested by

no test coverage detected