|
masterkrueger Wanderer
Joined: 24 Jan 2010 Posts: 65 Location: Hamburg
|
Posted: 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? |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: 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 |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: 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?
|
|
|
|
masterkrueger Wanderer
Joined: 24 Jan 2010 Posts: 65 Location: Hamburg
|
Posted: 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. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: 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. |
|
|
|
masterkrueger Wanderer
Joined: 24 Jan 2010 Posts: 65 Location: Hamburg
|
Posted: Wed May 05, 2010 11:01 am |
I hope i have time to post the script at weekend! :)
|
|
|
|
masterkrueger Wanderer
Joined: 24 Jan 2010 Posts: 65 Location: Hamburg
|
Posted: 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 "]"} |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: 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 |
|
|
|
masterkrueger Wanderer
Joined: 24 Jan 2010 Posts: 65 Location: Hamburg
|
Posted: Sun May 09, 2010 11:30 am |
Yes it works :) thanks!!!
|
|
|
|
|
|