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: Sun Jul 10, 2011 12:38 am   

eval Database variable spaces
 
Code:
#ADDKEY Mobs {%1} {%eval( @{Mobs.%1}+1)}


Eval seems to have a problem if %1 contains spaces. I don't want to use %replace to change all the spaces to underscores. Can anybody help me?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Jul 10, 2011 1:55 am   
 
It's not a problem with %eval(), you just cannot use spaces in key names when using the @var.key notation. Your choices are stark and simple here:

1)change the key names to something without spaces
2)use %db() instead of @var.key

Keep in mind that if you ever decide to go to CMud, as of 3.34 (probably any 3.x public version if there are earlier ones) you cannot use @var.key in an evaluation situation anyways.
_________________
EDIT: I didn't like my old signature
Reply with quote
Scirkhan
Apprentice


Joined: 14 Sep 2007
Posts: 167
Location: aztx

PostPosted: Sun Jul 10, 2011 10:55 pm   
 
So.. use %db() okay.
Yeah.. I already knew eval didn't create the issue.. just didn't know how to describe this..
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