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
Scirkhan
Apprentice


Joined: 14 Sep 2007
Posts: 167
Location: aztx

PostPosted: Sat Oct 15, 2011 6:55 am   

Data variable capturing problem
 
I have a trigger, it captures lines. It puts these lines into a database variable using #addkey
Line1 this is line one
Line2 this is line two
... and so on.

Sometimes, however, the entries for the next lines get put into the data of the last entry. Is this because of the | character?
This is what the problem looks like:
Line1 this is line one
Line2 this is line twoLine3 this is line threeLine4 this is line four

So, how do I fix this? Did I provide enough information for a solution?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4699
Location: Pensacola, FL, USA

PostPosted: Sat Oct 15, 2011 10:31 am   
 
yes... that is the issue, though i would think it would tend to split your entries premptively...
its a simple fix as well, dont use any of the 'special' characters inside a variable if you can help it

TempEntry=%replace(%1, "|", "_")

That will use an underscore instead of a bar.

#ADDKEY blahblah {@TempEntry=some value}

unfortunately... you will likely have to just delete the current incarnation of the variable

P.S. CMUD, the new version, offers nested (json) DBvariables
_________________
Discord: Shalimarwildcat
Reply with quote
Scirkhan
Apprentice


Joined: 14 Sep 2007
Posts: 167
Location: aztx

PostPosted: Sun Oct 16, 2011 2:29 am   
 
Thanks.. I tried replacing them with ~|, but another character would do the job.
Update:
For stringlists and database variables, replace these three characters: | ) (
That's what I've found so far.
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