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

Method getVariable

Engine/source/console/consoleInternal.cpp:556–573  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

554}
555
556const char *Dictionary::getVariable(StringTableEntry name, bool *entValid)
557{
558 Entry *ent = lookup(name);
559 if (ent)
560 {
561 if (entValid)
562 *entValid = true;
563 return ent->getStringValue();
564 }
565 if (entValid)
566 *entValid = false;
567
568 // Warn users when they access a variable that isn't defined.
569 if (gWarnUndefinedScriptVariables)
570 Con::warnf(" *** Accessed undefined variable '%s'", name);
571
572 return "";
573}
574
575S32 Dictionary::getIntVariable(StringTableEntry name, bool *entValid)
576{

Callers 1

getLocalVariableFunction · 0.45

Calls 3

lookupFunction · 0.85
warnfFunction · 0.70
getStringValueMethod · 0.45

Tested by

no test coverage detected