View Single Post
  #17  
Old 04-11-2007, 01:17 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Putting the variable names are part of the item array data is very bad in my opinion. What I've done with more simple systems like that is set a serverr variable that show whats at each index:
serverr.itemvars_<typename>=id,qty,name,image,weig ht
clientr.item<number>=23,1,"Fancy Sword",fancysword.png,5000

Then you use function like getitemvar(id, varname) and return the item index that matches the index of the varname in the serverr string.

Edit: With the simplest system I would have the type of item as the first variable, then I would find the right variable list for that type with a function before continuing so all items didn't require a master list.
__________________
Reply With Quote