 |
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Fri Dec 07, 2007 4:38 am
[2.15] String List writing problem |
I have a map set that I want to go through to to check for exits, I'm trying to write the information to a string list however I'm having a problem getting the string to write.
| Code: |
;#show %roomlink(3137,w)
#var RoomsWithUnlinkedLinks ""
#var RoomsWithUnlinkedLinksNames ""
#CALL %mapfilter( %concat( "ZoneID = ", %zonenum( )))
#LOOP %numrooms {
#say %i
#SHOW %roomname( %mapvnum( %i))
#show %roomvnum( %i)
#show %roomlink( %roomvnum( %i), w)
#if (%roomlink( %roomvnum( %i), w) = "-2") {
#say its a minus one
#say Other-West and %roomcom (%i)
#additem RoomsWithUnlinkedLinks Other-West and %roomcom (%i)
#say %roomvnum( %i)
#additem RoomsWithUnlinkedLinks %roomvnum( %i)
#say %roomname( %mapvnum( %i))
#additem RoomsWithUnlinkedLinks %roomname( %mapvnum( %i))
#say West
#additem RoomsWithUnlinkedLinks West} {}}
#additem RoomsWithUnlinkedLinks {the end}
#CALL %mapfilter( "")
#say @RoomsWithUnlinkedLinks
#say @RoomsWithUnlinkedLinksNames |
when Im done, the @roomswithunlinkedlinks comes out as Other-West|188|Boulevard of the Just|West|3137|Bar Room|6817|A Warm Sandstone Corridor|the end
I have no clue what could be the problem, and I've checked a bunch of different things including formatting. Sometimes it writes the west part, sometimes it doesnt.
I'm not sure if this is a bug or bad script on my part |
|
|
|
 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Fri Dec 07, 2007 12:17 pm |
You should be enclosing your strings to keep the words together as one phrase, basically.
For example:
| Code: |
| #additem RoomsWithUnlinkedLinks "Other-West and "%roomcom(%i) |
|
|
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Fri Dec 07, 2007 12:19 pm |
#say Other-West and %roomcom (%i)
Spaces between function and opening parenthesis makes them seperate entities.
#additem RoomsWithUnlinkedLinks Other-West and %roomcom (%i)
Interprets as 4 seperate parameters correct way is
#additem RoomsWithUnlinkedLinks {Other-West and %roomcom(%i)}
#additem RoomsWithUnlinkedLinks West
This is being added for each room found, but #ADDITEM does not permit duplicates, that is why it is only there once. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Dec 11, 2007 5:36 pm |
Also, PLEASE PLEASE post questions about the CMUD BETA version to the CMUD BETA Discussion Forum. People in the normal CMUD Discussion Forum are still using v1.34 and it can be very confusing for people to see posts about newer Beta versions in this forum until the next public version is officially released.
|
|
|
|
 |
|
|
|