
04-11-2007, 01:17 AM
|
|
Incubator
|
 |
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
|
|
|
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. |
|
|
|