Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Talmark
Novice


Joined: 22 Nov 2003
Posts: 34

PostPosted: Mon Oct 25, 2004 12:16 am   

Trouble with %roomcontents
 
I can't get contents added to a room in the mapper without manually clicking the Add Item to Room button in the database window--so I'm not able to use this function in any script.

I've tried to unlock the mapper with:

#EXE %maplocked(0)

And I've also tried to manually put the mapper into map mode before using the function:

#EXE %roomcontents(128he)

The help files says this will add record 128 from the Herbs database to the room current room. But nothing happens. Any suggestions?
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Mon Oct 25, 2004 1:25 am   
 
Try (havn't tested this but the correct way to call a function is with #call)
#call %maplocked(0)
#call %roomcontents(128he)
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Talmark
Novice


Joined: 22 Nov 2003
Posts: 34

PostPosted: Mon Oct 25, 2004 2:05 am   
 
Thanks. I got it to work with this:

#CALL %roomcontents(%roomnum,128he)

The help file for %roomcontents states that if vNum is omitted, 128he will be added to the current room. It doesn't appear to work like that, though. I had to use %roomnum to pull the current room number from the mapper.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Mon Oct 25, 2004 2:19 am   
 
Ahhhhh I didn't bother reading the help if the first value is optional there still has to be a comma there :P

#CALL %roomcontents(,128he)
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Talmark
Novice


Joined: 22 Nov 2003
Posts: 34

PostPosted: Mon Oct 25, 2004 2:28 am   
 
Yikes, forgot the comma! How many scripts have I pulled my hair out over because of a comma!

Now I just have to figure out how to get this to add items to the room contents without creating duplicates.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net