|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Thu Nov 30, 2006 9:44 pm
[1.17] DB Records, digits as keys |
Code: |
#unvar testvar
testvar.one = 1
testvar.two = 2
#SHOWDB @testvar |
correctly outputs:
Quote: |
Variable testvar removed.
one: 1
two: 2 |
but
Code: |
#unvar testvar
testvar.1 = one
testvar.2 = two
#SHOWDB @testvar |
outputs:
Quote: |
Variable testvar removed.
one|two: |
something odd when the key is a digit? |
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Thu Nov 30, 2006 11:44 pm |
Personally, I think it's not a bug but a fix to a zMUD kludge. It could go either way, I guess. The var.# syntax is more useful for finding elements in a string list or array. If you use #ADDKEY to make number keys, it works just fine.
|
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Thu Nov 30, 2006 11:53 pm |
I agree, the var.# would be the more useful of the two, so you can easily reference the nth item of an arrary etc.
var.# is what's broken though ;) |
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Dec 01, 2006 12:00 am |
This is not a bug. The var.# syntax is used for setting and retrieving elements of a string list or array, as Larkin said. This is by design. If you want to use numeric keys in a database variable, you have to use #ADDKEY to set them, and %db to retrieve them.
|
|
|
|
|
|