ifcheck ispassage, does it work?

Posted by Zeno on Sun 08 May 2005 09:50 PM — 3 posts, 9,101 views.

USA #0
Name: The Owner's Corridor.  Vnum: 2510.
>speech_prog test
if ISPASSAGE($n) == 2
 mpecho There is an exit south.
else
 mpecho Else!
endif

2 is south.

This is the room.
The Owner's Corridor []
Exits: north south.


There's an exit south.

Quote:
You say 'test'
Else!


Am I doing something wrong or does it not work? Using SmaugFUSS.
Quote:
EXAMPLE: if ispassage($n) == 6
'There is a passage leading northeast.

DESCRIPTION: The ISPASSAGE(dir) ifcheck is used to
determine if there is an exit in the
specified direction. (HELP DOORDIRS)



[EDIT] Turns out the helpfile was wrong, heh. Changed it to the correct syntax:
Quote:

EXAMPLE: if ispassage($n) == northeast
'There is a passage leading northeast.

DESCRIPTION: The ISPASSAGE(dir) ifcheck is used to
determine if there is an exit in the
specified direction. (HELP EXITS)
Do NOT use doordirs. Use the exit name.
Amended on Sun 08 May 2005 09:57 PM by Zeno
USA #1
Nice catch on the helpfile. Updated the 1.6 package to the correct syntax.
USA #2
Actually there are a bit more helpfiles that are wrong too. Mpclosepassage said to use exit names, while it actually uses exit numbers.