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
billaben
Wanderer


Joined: 02 Sep 2005
Posts: 60

PostPosted: Fri Sep 16, 2005 10:12 pm   

More problems with Strings
 
I'm still having a horrible time with basic string manipulation in zMUD. It seems no matter what I do it likes to mangle my strings.

Code:
#VAR DescLine %concat( %literal( "%1"), "%lf")


this line actually works. It correctly puts a linefeed at the end of the line.
But when I try to add this line to my main variable for the Description....

Code:
#VAR DescBlock %concat(@DescBlock, @DescLine)


Then this....
Code:

This tunnel has been carved from the rock by the flowing magma over the
years, leaving walls which are very smooth and black. Although no magma
flows through here currently, the heat is still sweltering.


Becomes...

Code:
  This tunnel has been carved from the rock by the flowing magma over theyears, leaving walls which are very smooth and black. Although no magma flowsthrough here currently, the heat is still sweltering.


This. *cries*. As usual. zMUD is doing it's best to mangle my strings. In this case all my carefully inserted linefeeds which took many hours of cursing and swearing to preserve in the first place are once again whisked away like they were never there. Again I've tried many combinations of %literal,%expand, and even directly smashing the strings together without using %concat. Of course, nothing works.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Sep 17, 2005 12:32 pm   
 
#VAR DescLine %concat( %literal( "%1"), %crlf)
#VAR DescLine %concat( %literal( "%1"), %cr)
#VAR DescLine %concat( %literal( "%1"), %lf)

Use whichever looks best in the mapper display.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
billaben
Wanderer


Joined: 02 Sep 2005
Posts: 60

PostPosted: Sat Sep 17, 2005 8:38 pm   
 
That part I got. But is there a way to collect the entire description up into DescBlock without it getting mangled?
Reply with quote
billaben
Wanderer


Joined: 02 Sep 2005
Posts: 60

PostPosted: Wed Sep 21, 2005 5:20 pm   
 
I'm still hoping to find an answer on this. I want to store the entire description block in a single variable and keep the formatting intact since in many cases it becomes nearly unreadable if I do not.

I've tried

#VAR DescBlock %concat( %literal( "@Descblock", "@DescLine"))

But obviously the syntax for something like this is different when an actual variable is involved since if I do this all I get is unexpanded variable names at the end.

I've tried many variations and can't manage to come up with something which will keep the entire description block (including linefeeds) intact.
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