parser sees synonym (which is also a special char) as UnknownWord?

Started by arj0n, Sun 29/06/2025 18:43:42

Previous topic - Next topic

arj0n

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.)

Code: ags
if (Parser.Said("help")){do something}
or
Code: ags
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

Code: ags
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:
Code: ags
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)

SMF spam blocked by CleanTalk