Question on mpopenpassage

Posted by Nick Cash on Wed 04 Jun 2003 01:42 AM — 4 posts, 20,216 views.

USA #0
Note: Using SWR 1.0
I was working on my mud today and one of my builders asked me how he could make a button that someone would push and a door would open, and if the pulled the button it would close. Now, I have in now way ever used mpopenpassage, but it seemed like the ideal thing to use for making a temporary passage between rooms. So I folloed the syntax:

mpopenpassage <origin> <destination> <direction>

Right now I'm assuming that origin and destination mean using the vnums, however I'm not sure if that is entirely correct since it keeps giving me errors when I execute the program. So this is what I had (entire prog):
>push_prog 100
mpopenpassage 9600 9599 n
mpecho The door slides open.

However, this didn't work, so I tried differen't things, such as flipping the vnums around and chaning n to north and such, but it still gives me the error. Btw, this is the error:
Log: [*****] BUG: MpOpenPassage - Bad syntax, Object #9400

So I guess my question is what is the right syntax exactly? Do I not use vnums? What else do I use?

As always, thanks for any and all help.
USA #1
Just a suggestion here, not sure if SWR is like Smaug entirely in this regard but I recall having to use numbers for the various exit directions. Not sure what these numbers are but I believe they can be found in one of the help files, at least it was that way with Smaug.

Again, not sure if this helps you with SWR but remember having issues when I tried to do something similar. That was a while ago however, so forgive me if this info is unhelpful or just plain wrong.

Peace
USA #2
MPOPENPASSAGE in SWR uses the exit numbers as well. They should (considering stock SWR) be as so:

NORTH        0   
EAST         1   
SOUTH        2   
WEST         3   
UP           4   
DOWN         5   
NORTHEAST    6    
NORTHWEST    7    
SOUTHEAST    8   
SOUTHWEST    9
SOMEWHERE   10

So in your case, substitute 0 for n
USA #3
I remember using numbers for exits before. Thanks, it works fine now :)