|
Scirkhan Apprentice
Joined: 14 Sep 2007 Posts: 167 Location: aztx
|
Posted: 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? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
Scirkhan Apprentice
Joined: 14 Sep 2007 Posts: 167 Location: aztx
|
Posted: 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.. |
|
|
|
|
|