MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / setCurVarName

Method setCurVarName

Engine/source/console/compiledEval.cpp:382–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380//------------------------------------------------------------
381
382void ExprEvalState::setCurVarName(StringTableEntry name)
383{
384 if (name[0] == '$')
385 currentVariable = globalVars.lookup(name);
386 else if (getStackDepth() > 0)
387 currentVariable = getCurrentFrame().lookup(name);
388 if (!currentVariable && gWarnUndefinedScriptVariables)
389 Con::warnf(ConsoleLogEntry::Script, "Variable referenced before assignment: %s", name);
390}
391
392void ExprEvalState::setCurVarNameCreate(StringTableEntry name)
393{

Callers 1

execMethod · 0.80

Calls 2

warnfFunction · 0.70
lookupMethod · 0.45

Tested by

no test coverage detected