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


Joined: 10 Feb 2004
Posts: 21
Location: Sweden

PostPosted: Tue Jan 09, 2007 2:54 pm   

#ADDKEY doesnt work with global records.
 
Like the topic says, I am having problems with #addkey.
If you create a data record in global, then use #addkey, it will erase anything within the record.
Atm I haft to pull down my record from global to local settings using #VAR, then adjust all records accordingly, then use #GVAR to replace the old global data record.

Sure it's possible to use %addkey but it a lot slower then #addkey.

I was going to bug report this but I thought i'd post here first, see if anyone had this problem before and solved it.
_________________
When you lose, dont lose the lesson.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Jan 10, 2007 3:41 am   
 
This sounds way too much like a different problem, so rather than going into ZMud and checking it out when I should be heading off to bed I'll just ask a stupid question (stupid, assuming you're already aware of this issue):

Are you using #ADDKEY @varname keyname keyvalue or #ADDKEY varname keyname keyvalue?

Anytime you use #command @varname to assign data to a variable it will overwrite the old contents with the new contents. Commands that don't do assignment will usually try to reference a variable with the name of "@varname", which will likely not exist. This is called indirect referencing.

EDIT: added to last paragraph.
_________________
EDIT: I didn't like my old signature
Reply with quote
Mortis
Beginner


Joined: 10 Feb 2004
Posts: 21
Location: Sweden

PostPosted: Wed Jan 10, 2007 8:36 am   
 
I am using #ADDKEY varname keyname value or #ADDKEY varname {keyname1=value|keyname2=value}, depending on the situation, but neither work.

I cannot think of any reason why this doesnt work when #ADDITEM work with global varibles. It would really speed things up for me if it did work. As I store a lot of data in global records, prompt etc.
_________________
When you lose, dont lose the lesson.
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