| 246 | } |
| 247 | |
| 248 | inline void ExprEvalState::setCurVarNameCreate(StringTableEntry name) |
| 249 | { |
| 250 | if(name[0] == '$') |
| 251 | currentVariable = globalVars.add(name); |
| 252 | else if( getStackDepth() > 0 ) |
| 253 | currentVariable = getCurrentFrame().add(name); |
| 254 | else |
| 255 | { |
| 256 | currentVariable = NULL; |
| 257 | Con::warnf(ConsoleLogEntry::Script, "Accessing local variable in global scope... failed: %s", name); |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | //------------------------------------------------------------ |
| 262 |