Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: arj0n on Sun 29/06/2025 18:43:42

Title: parser sees synonym (which is also a special char) as UnknownWord?
Post by: arj0n on Sun 29/06/2025 18:43:42
Parser library contains the words help, h, and ?, each three being synonyms of each other (having the same id).

The questionmark 'word' doesn't seem to act like a synonym word. Is that intended?
(i couldn't find anything on 'special characters' concerning the parser in the manual.)

if (Parser.Said("help")){do something}or
if (Parser.Said("h")){do something}when user input is help or h, al works fine, but
when user input is ?, the ? is detected as UnknownWord

if (Parser.Said("?")){do something}when user input is ?, al works fine, but
when user input is help or h, both are detected as UnknownWord

So while being synonyms, to let the parser detect these three 'words' correctly, I must combine them like they are non-synonyms:
if ((Parser.Said("?"))||(Parser.Said("help"))){do something}now when user input is ?, h, or help: al works fine

(using AGS Build 4.00.00.17)