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
Nullzone
Newbie


Joined: 25 Sep 2002
Posts: 8
Location: Spain

PostPosted: Wed Sep 25, 2002 12:08 am   

Using Data records - what functions?
 
Hi all,

may any help me just telling me about how using datarecords?
must i do some funtions for getting the items from the string_list and after that analize the X=value ?

I havent found any about at predefined functions, just only for string list and alone strigns.

Seeya
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Sep 25, 2002 2:48 am   
 
quote:

Hi all,

may any help me just telling me about how using datarecords?
must i do some funtions for getting the items from the string_list and after that analize the X=value ?

I havent found any about at predefined functions, just only for string list and alone strigns.

Seeya



Ok, first, there are a few methods that work (or won't work, depending on what you're trying to do):

@Variable.field notation -- if you've ever used an object-oriented programming language, you probably already know what this is or have seen it in use. In ZMud, it's limited to one level of fields and so @Variable.field.field would never work. The drawback to this notation is that @Variable.@Field does not work.

Using ZMud commands/functions -- Remember when I said the @Variable.@Field doesn't work? Well, the way around this limitation is to use #ADDKEY or a similar function/command. #ADDKEY will allow you to specify a variable fieldname and will either add that field to the data record if it doesn't exist, or replace the contents with those specified in the #ADDKEY command.

li'l shmoe of Dragon's Gate MUD
Reply with quote
Nullzone
Newbie


Joined: 25 Sep 2002
Posts: 8
Location: Spain

PostPosted: Wed Sep 25, 2002 7:58 pm   
 
quote:

quote:

Hi all,

may any help me just telling me about how using datarecords?
must i do some funtions for getting the items from the string_list and after that analize the X=value ?

I havent found any about at predefined functions, just only for string list and alone strigns.

Seeya



Ok, first, there are a few methods that work (or won't work, depending on what you're trying to do):

@Variable.field notation -- if you've ever used an object-oriented programming language, you probably already know what this is or have seen it in use. In ZMud, it's limited to one level of fields and so @Variable.field.field would never work. The drawback to this notation is that @Variable.@Field does not work.

Using ZMud commands/functions -- Remember when I said the @Variable.@Field doesn't work? Well, the way around this limitation is to use #ADDKEY or a similar function/command. #ADDKEY will allow you to specify a variable fieldname and will either add that field to the data record if it doesn't exist, or replace the contents with those specified in the #ADDKEY command.

li'l shmoe of Dragon's Gate MUD



Thanks :) %db() and rest of functions was the solution.
Thanks for the perfect clue :)
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