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
Thunderbuster
Novice


Joined: 07 Nov 2001
Posts: 45
Location: USA

PostPosted: Thu Oct 31, 2002 6:18 am   

I thought I had it, but mutter mutter...I don't...
 
Here is my sample data from the mud:
A Well-Traveled Road
x%+
+#:
::+

I am wanting to capture those 3 lines under the Room Name so that I can put them into a 3x3 array.

Here is what I have based on previous input from MattLofton:

#trigger {A Well-Traveled Road} {
#T+ MapRad
CapOut=0}

#trigger {(%*)} {
#ADD CapOut 1
#if (@CapOut=1) {MapGrid1=%1}
#if (@CapOut=2) {MapGrid2=%1}
#if (@CapOut=3) {MapGrid3=%1}
#if (@CapOut > 3) {#T- MapRad}} "MapRad"

My code is only capturing the top line and assigning it to MapGrid1 where MapGrid1=x%+ MapGrid2=empty and MapGrid3=empty

I am confused. How can this be? What am I doing wrong? I have even remarked out the last line #if (@CapOut > 3) {#T- MapRad} and get the same results, so I know it isn't because it is prematurely turning off the script. Help!
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Oct 31, 2002 6:50 am   
 
It might because ZMud's trying to parse the data in %1. With all them special symbols, it would be surprising if that's what was happening.

What happens if you surround each %1 with double quotes?

EDIT: you might be better served with this or a #CASE command instead of 3 #IF commands:

#if (@capout <= 3) {MapVar@capout = "%1"} {#T- MapRad}

li'l shmoe of Dragon's Gate MUD
Reply with quote
Thunderbuster
Novice


Joined: 07 Nov 2001
Posts: 45
Location: USA

PostPosted: Thu Oct 31, 2002 7:59 am   
 
You are the Bomb! It was the dbl quotes from around the %1's. Thanks much...
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