mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-31 05:40:44 +00:00
Save function name for error message in ParseStates()
- The error "You cannot pass parameters to..." used the most recent token, which was always ( and not the function name. (Note that this was already fixed in the scripting branch, so this is probably going to be a conflict. Meh.)
This commit is contained in:
parent
4ea918ab3b
commit
b2abf224b5
2 changed files with 4 additions and 3 deletions
|
@ -332,7 +332,8 @@ do_stop:
|
||||||
goto endofstate;
|
goto endofstate;
|
||||||
}
|
}
|
||||||
|
|
||||||
PSymbol *sym = bag.Info->Class->Symbols.FindSymbol (FName(sc.String, true), true);
|
FName funcname = FName(sc.String, true);
|
||||||
|
PSymbol *sym = bag.Info->Class->Symbols.FindSymbol (funcname, true);
|
||||||
if (sym != NULL && sym->SymbolType == SYM_ActionFunction)
|
if (sym != NULL && sym->SymbolType == SYM_ActionFunction)
|
||||||
{
|
{
|
||||||
PSymbolActionFunction *afd = static_cast<PSymbolActionFunction *>(sym);
|
PSymbolActionFunction *afd = static_cast<PSymbolActionFunction *>(sym);
|
||||||
|
@ -434,7 +435,7 @@ do_stop:
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
if (sc.Compare("("))
|
if (sc.Compare("("))
|
||||||
{
|
{
|
||||||
sc.ScriptError("You cannot pass parameters to '%s'\n",sc.String);
|
sc.ScriptError("You cannot pass parameters to '%s'\n", funcname.GetChars());
|
||||||
}
|
}
|
||||||
sc.UnGet();
|
sc.UnGet();
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ ACTOR Demon 3002
|
||||||
Goto See
|
Goto See
|
||||||
Death:
|
Death:
|
||||||
SARG I 8
|
SARG I 8
|
||||||
SARG J 8 A_Scream
|
SARG J 8 A_Scream()
|
||||||
SARG K 4
|
SARG K 4
|
||||||
SARG L 4 A_NoBlocking
|
SARG L 4 A_NoBlocking
|
||||||
SARG M 4
|
SARG M 4
|
||||||
|
|
Loading…
Reference in a new issue