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

Method getVariable

Engine/source/console/consoleInternal.cpp:476–493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474}
475
476const char *Dictionary::getVariable(StringTableEntry name, bool *entValid)
477{
478 Entry *ent = lookup(name);
479 if(ent)
480 {
481 if(entValid)
482 *entValid = true;
483 return ent->getStringValue();
484 }
485 if(entValid)
486 *entValid = false;
487
488 // Warn users when they access a variable that isn't defined.
489 if(gWarnUndefinedScriptVariables)
490 Con::warnf(" *** Accessed undefined variable '%s'", name);
491
492 return "";
493}
494
495void ConsoleValue::setStringValue(const char * value)
496{

Callers 1

getLocalVariableFunction · 0.45

Calls 2

warnfFunction · 0.85
getStringValueMethod · 0.45

Tested by

no test coverage detected