Fixes for creating variable in local scope

This commit is contained in:
2019-05-29 15:10:16 +02:00
parent 188d89db94
commit bda561b775
4 changed files with 20 additions and 5 deletions

View File

@@ -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();
}