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

Method setCurVarNameCreate

Engine/source/console/compiledEval.cpp:392–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392void ExprEvalState::setCurVarNameCreate(StringTableEntry name)
393{
394 if (name[0] == '$')
395 currentVariable = globalVars.add(name);
396 else if (getStackDepth() > 0)
397 currentVariable = getCurrentFrame().add(name);
398 else
399 {
400 currentVariable = NULL;
401 Con::warnf(ConsoleLogEntry::Script, "Accessing local variable in global scope... failed: %s", name);
402 }
403}
404
405//------------------------------------------------------------
406

Callers 1

execMethod · 0.80

Calls 2

warnfFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected