|
Grish Beginner
Joined: 26 Jan 2003 Posts: 22
|
Posted: Wed Jan 29, 2003 2:23 pm
Newbie witha very simple problem |
Sorry if I'm slow, but been trying out this small script I made to fix my maps, but I can't seem to get it to work.
What I want to do is fix my maps, by adding a space to the end of the room name. Some room names already end with a space so I check if it ends with a "." and if so add a space.
A place the following script in an alias called fixmap. When i enter fixmap, the script sends a room name to the mud. What am I doing wrong? Here's the script:
#LOOP %numroom {temp = %roomname( %i);#IF %ends( @temp, ".") {temp = %concat( temp, " ")};%roomname( %i, @temp)}
Thanks for the help! |
|
|
|
Talahaski Enchanter
Joined: 10 Oct 2000 Posts: 656 Location: USA
|
Posted: Wed Jan 29, 2003 4:22 pm |
I'm not positive, but it looks like your missing a @ in front of temp
#LOOP %numroom {temp = %roomname( %i);#IF %ends( @temp, ".") {temp = %concat( @temp, " ")};%roomname( %i, @temp)}
Also, your map needs to be in unlocked mapping mode. if the map is off or in follow mode it will not work.
Talahaski
Processor PIII 1000
Memory 265MB
Video NVIDIA 64MB
Windows XP
Zmud Version 6.50
Zmapper Version 1.14 |
|
|
|
Grish Beginner
Joined: 26 Jan 2003 Posts: 22
|
Posted: Wed Jan 29, 2003 5:31 pm |
Thanks Talahaski! I used this script
#LOOP 1,%numrooms() {temp = %roomname(%i);#IF %ends( @temp, ".") {temp = %concat( @temp, " ")};%roomname( %i, @temp)}
It works a bit. My problem though is that I don't seem to scroll through all the rooms and edit them. I looked at the rooms in spreadsheet view and I notice that my room numbers aren't in sequiential order. I have room number at 100+ when All I have is 60+ rooms. Is there a workaround for this?
Thanks again for the help! |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Jan 29, 2003 6:11 pm |
Use %mapvnum:
#LOOP 1,%numrooms() {temp = %roomname(%mapvnum(%i));#IF %ends( @temp, ".") {temp = %concat( @temp, " ")};%roomname( %mapvnum(%i), @temp)}
Kjata |
|
|
|
Grish Beginner
Joined: 26 Jan 2003 Posts: 22
|
Posted: Thu Jan 30, 2003 12:59 pm |
Thank you Kjata!
that did the trick!
Now to fix my maps |
|
|
|
|
|