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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
masterkrueger
Wanderer


Joined: 24 Jan 2010
Posts: 65
Location: Hamburg

PostPosted: Mon May 03, 2010 12:40 pm   

setting %roomid with parameter
 
I switched to CMUD some days ago. There must be some changes i cant make out.
The script was working fine in zMUD until CMUD.

The following part has stopped working:

#noop %roomid(,%1)

i already tried to use the new form

#noop %roomid(,%param(1))

but it is not working. I tried to convert the %param(1) to String. But it should be in that state already am i right?
I can put any text in there and it's set as the roomid but not my aliparameter.

I put the map in write mode btw ;)

Any idea?
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Mon May 03, 2010 5:07 pm   
 
Er, don't use #noop and instead use #CALL...

#NOOP has always meant 'pay no attention to anything after this command.' It's the equivalent of doing #0 {Do stuff here}. (At least, pretty sure...)

That's the only thing I can think of...

If that refuses to work still, then do

#CALL %maplocked(0)
#CALL %roomid(,%1)
#CALL %maplocked(1)

Charneus
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon May 03, 2010 6:05 pm   
 
If changing #NOOP to #CALL doesn't work, you might copy the entire script (preferably the XML version) to the list so we can look it over. Are you sure this is the only part not working?
Reply with quote
masterkrueger
Wanderer


Joined: 24 Jan 2010
Posts: 65
Location: Hamburg

PostPosted: Tue May 04, 2010 6:16 am   
 
Yes i think so, the compile error points to the parameter %1 that should be passed to the %roomid( ,...).
I will try this, I'm not sure why i used #noop in zMUD to get things to work. Maybe it's no use anymore.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue May 04, 2010 2:26 pm   
 
Ah! You didn't say there was a compile error.

I just put the following into a blank sesion:
Quote:
#noop %roomid(,%1)

I get no syntax error. Therefore, the problem is not with this line. What exactly does the compile error message say? Perhaps it is simply mismatched parentheses. If you copy the entire code here in the forum, we can probably figure it out quickly.
Reply with quote
masterkrueger
Wanderer


Joined: 24 Jan 2010
Posts: 65
Location: Hamburg

PostPosted: Wed May 05, 2010 11:01 am   
 
I hope i have time to post the script at weekend! :)
Reply with quote
masterkrueger
Wanderer


Joined: 24 Jan 2010
Posts: 65
Location: Hamburg

PostPosted: Thu May 06, 2010 7:52 pm   
 
This is my script to set a room shortname:

#if (%null( %roomid)) {
#noop %maplocked( 0)
#noop %roomid(,%1)
#noop %maplocked( 1)
#echo "Roomname [" %1 "]"
} {#echo "The room already has the ID [" %roomid "]"}
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Thu May 06, 2010 8:51 pm   
 
Found a bug with this, actually, thanks to you. Will post the bug in a separate post, though.

Copying/pasting your script and making no changes, it doesn't error for me. However, it also doesn't work, like I assumed it wouldn't. Changing the #NOOPs to #CALLs works, however. Copy/paste your script above, change #NOOP to #CALL and save and try it again. It should work.

Charneus
Reply with quote
masterkrueger
Wanderer


Joined: 24 Jan 2010
Posts: 65
Location: Hamburg

PostPosted: Sun May 09, 2010 11:30 am   
 
Yes it works :) thanks!!! Laughing
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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