forked from mirror/openmw-tes3mp
ignore attempts to set non-existing variables
This commit is contained in:
parent
b3412b7eec
commit
749136bf33
1 changed files with 8 additions and 0 deletions
|
@ -219,6 +219,14 @@ namespace Compiler
|
|||
|
||||
bool LineParser::parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner)
|
||||
{
|
||||
if (mState==SetPotentialMemberVarState && keyword==Scanner::K_to)
|
||||
{
|
||||
getErrorHandler().warning ("unknown variable (ignoring set instruction)", loc);
|
||||
SkipParser skip (getErrorHandler(), getContext());
|
||||
scanner.scan (skip);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mState==SetState)
|
||||
{
|
||||
// allow keywords to be used as variable names when assigning a value to a variable.
|
||||
|
|
Loading…
Reference in a new issue