Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
adalius
Beginner


Joined: 23 May 2009
Posts: 15

PostPosted: Sat May 30, 2009 9:22 pm   

Escaping ~ In A List From The MUD
 
Basically, the mud sends me X~Stuff~Y~MoreStuff~Z~EvenMoreStuff as part of a longer string.
It always comes in pairs or in a hanging pair (X~~Y~Stuff, X is hanging), but the number of pairs isn't fixed,
so one round it could be (X~1~Y~2~Z~A String!), the next it could be (X~~Y~1), etc.

I capture it into a variable, and in the editor when I hover over @T it shows it as typed above. However if I do a #PRINT @T
it does what you'd expect and prints XStuffYMoreStuffZEvenMoreStuff.

I wanted to basically explode() on ~ and store @T into a @T_List var by doing %replace(@T,"~","|").
I've tried using "~","~~","~~~", %literal, %stripq, and so far I can't get it to process it like I'm trying.

I can't change the special char for ~ as it would mess up a metric buttload of scripts.

Thoughts?

EDIT: Ignore this, changed the @T to a literal string type and its working.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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