Fixes for creating variable in local scope
This commit is contained in:
@@ -57,3 +57,12 @@ void Script::Parse(string script) {
|
||||
delete parseResult;
|
||||
}
|
||||
|
||||
EvalValue *Script::GetVariable(const string &key) {
|
||||
return _scriptVariables -> at(HashedString(key).GetHash());
|
||||
}
|
||||
|
||||
bool Script::HasVariable(const string &key) {
|
||||
auto f = _scriptVariables->find(HashedString(key).GetHash());
|
||||
return f != _scriptVariables->end();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user