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
kingfish1
Beginner


Joined: 13 Jun 2005
Posts: 20

PostPosted: Mon Feb 22, 2010 3:37 am   

%additem problems with parentheses in variable
 
I am having trouble with %additem and adding a variable with parentheses. Here is what I have tried:

#VAR TEST "1"
#PRINT @TEST this prints: 1
#VAR TEST2 "(testString)my test"
#VAR TEST %additem(@TEST2, @TEST)
#PRINT @TEST this prints: 1|1|"(testString)my test"

See how it adds a duplicate entry of whatever was in the string list before adding the variable with parentheses.

I have tested #ADDITEM and it seems to work fine for example:

#VAR TEST "1"
#PRINT @TEST this prints: 1
#VAR TEST2 "(testString)my test"
#ADDITEM TEST @TEST2
#PRINT @TEST this prints: 1|"(testString)my test"

It doesn't duplicate the previous entry.

I can't use #ADDITEM because I have duplicate named entries for my string list. Is this a bug, can anyone think of a workaround for this?

Thanks

-KF
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Feb 22, 2010 7:02 pm   
 
Actually, the problem can be demonstrated even without a second variable:
Code:
#VAR TEST "1"
#PRINT @TEST
#VAR TEST %additem("(testString)my test", @TEST)
#PRINT @TEST


What version are you using, kingfish1? I tested this on the Beta version, v.3.14a. I think you indicated in another posting that you are also using the Beta version. If that's correct, I'll put a proper bug report on the Beta forum (which is where this should have been posted).
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