spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * Parser functions

FindWordID

static int Parser.FindWordID(string wordToFind)
Looks up wordToFind in the text parser dictionary, and returns the ID number.

If the word is not found, returns -1.
Otherwise, the Word Group number is returned, as seen in the Text Parser tab in the editor.

You can determine if two words are synonyms by looking them both up and seeing if the returned IDs are the same.

Ignore words are returned as ID 0.

This function is useful if you want to use the AGS Text Parser dictionary, but implement some custom parsing functionality instead of using the standard ParseText function.

Example:

 if (Parser.FindWordID("machine") > 0)
 {
   Display("machine is in the game dictionary");
 }
will display a message if the game dictionary includes "machine"

Compatibility: Supported by AGS 3.1.0 and later versions.

See Also: Parser.ParseText


User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.