Prev: 49950 Up: Map Next: 49989
49965: Parser: Validate Input Tokens
Used by the routines at Action_Give, Action_Kill and Action_Tie.
Accept a command that names one or two objects, and reject the rest.
Parser_ValidateInputTokens 49965 CALL Parser_ValidateDirectObject Return if the words after the verb are not valid for this command.
49968 RET C
49969 CP 1 Jump to Parser_ValidateInputTokens_Next unless the carried location matches.
49971 JR NZ,Parser_ValidateInputTokens_Next
Only one object was named.
49973 CALL Response_PleaseBeMoreSpecific Call Response_PleaseBeMoreSpecific.
49976 SCF Set the carry flag to reject the command.
49977 RET Return.
Parser_ValidateInputTokens_Next 49978 CP 3 Jump to Parser_ValidateInputTokens_Rephrase when the value 3 succeeded.
49980 JR NC,Parser_ValidateInputTokens_Rephrase
49982 AND A Clear the carry flag; the input tokens are valid.
49983 RET Return.
Too many objects were named.
Parser_ValidateInputTokens_Rephrase 49984 CALL Response_PleaseRephraseThat Call Response_PleaseRephraseThat.
49987 SCF Set the carry flag to reject the command.
49988 RET Return.
Prev: 49950 Up: Map Next: 49989