| 554 | } |
| 555 | |
| 556 | const 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 | |
| 575 | S32 Dictionary::getIntVariable(StringTableEntry name, bool *entValid) |
| 576 | { |
no test coverage detected