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
Grish
Beginner


Joined: 26 Jan 2003
Posts: 22

PostPosted: 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!
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: 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
Reply with quote
Grish
Beginner


Joined: 26 Jan 2003
Posts: 22

PostPosted: 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!
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: 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
Reply with quote
Grish
Beginner


Joined: 26 Jan 2003
Posts: 22

PostPosted: Thu Jan 30, 2003 12:59 pm   
 
Thank you Kjata!

that did the trick!
Now to fix my maps
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