intfiction.org

The Interactive Fiction Community Forum
It is currently Thu Oct 18, 2018 5:32 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Topic failing to match?
PostPosted: Fri Aug 03, 2018 12:37 pm 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2659
Location: The Midwest
I have a long list of adjectives, and wish to check whether any of them exists in the player's command.

Code:
Understand "hideous/faint/nameless/singular/maddening/abnormal/blasphemous/accursed/loathsome/eldritch/indescribable/aberrant/abominable/absurd/abysmal/alien/ambiguous/amorphous/anarchic/ancient/anomalous/appalling/atrocious/cancerous/cellular/changeable/confusing/congealed/corrupted/decomposing/deformed/degenerated/degraded/delirious/detestable/diabolical/diseased/disgusting/distorted/dreadful/effervescent/festering/fetid/fiendish/piscatorial/fluctuating/fluid/foaming/fungal/gangrenous/ghastly/glutinous/greenish/grim/grisly/hateful/hellish/ichorous/infernal/infested/inhuman/insipid/irregular/malevolent/malicious/malignant/membranous/menacing/mesmerizing/monstrous/morbid/mottled/moldering/nauseating/nebulous/necromantic/noxious/obscene/odious/odorous/oily/ominous/oozing/organic/pale/pallid/peculiar/perfidious/perverse/phlegmatic/poisonous/profane/protoplasmic/pseudopodal/pulsating/chthonic/quiescent/repellent/reprehensible/reptilian/repugnant/repulsive/resplendent/sacrilegious/sallow/sanguine/sordid/tenebrous/turbid/unclean/uncouth/unspeakable/unutterable/vague/vaporous/vile/viscous/warped/wet/damp/wretched/zymotic/infectious/putrescent/daemoniac/fetid/fungoid/lurking/non-euclidean/squamous/ululating" as "[adjective match]".
After reading a command when the location is Foobar:
   if the player's command includes "[adjective match]":
      say "Match!";
      reject the player's command.


But for some reason this doesn't work.

Quote:
>x chthonic
Match!

>x chthonic foobar
You can't see any such thing.


This seems odd, since the documentation (§18.33) says:

Quote:
if (snippet) includes (topic):
This condition is true if the given snippet includes words matching the specification, either at the beginning, in the middle, or at the end. Example: if the player's command includes "room [number]", ... will be true if the command is ROOM 101, EXPLORE ROOM 7, or ROOM 22 AHOY, but not if it's VISIT ROOM GAMMA 7.


What's going wrong here?

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Aug 03, 2018 4:26 pm 
Offline
User avatar

Joined: Mon Jun 11, 2018 3:15 pm
Posts: 15
I copied your code and pasted it verbatim into a project. It works as expected. Do you need to upgrade, maybe?

I'm running Inform 7 6M62 from February 23rd, 2018.

_________________
~Esad


Top
 Profile Send private message  
Reply with quote  
PostPosted: Fri Aug 03, 2018 10:08 pm 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2659
Location: The Midwest
Odd…I'll uninstall and reinstall Inform and see if that fixes it.

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group