![]() |
Order of Value in Clientr. Vars
Well, this is imposing an extreme irritation on me. Very recently, I've been coding an inventory for a small server project.
Most of the item data is help in vars something like: clientr.mud.item<id>=information The problem here is that if the ids get over 9 for example and go to maybe 10 and 11, the list will go as so... clientr.mud.item1=foo clientr.mud.item10=bar clientr.mud.item11=baz clientr.mud.item2=foobar This needs to be addressed as it's something quite silly. :( |
Why does it matter? Do you really need to edit these in RC?
|
yeah, I can see how it is silly and can be irritating, but it's no big deal.
|
Quote:
|
Quote:
|
Also, if you think about it ... it's just alphabetizing. There really is no other way to do it.
|
Well, you could get the numbers, then make a function to reorder them ;o
(Page based inventory, yes? :] ) |
Quote:
And yes it is. :o Quote:
|
It's ordered alphabetically. There's really no way to change it to order numbers correctly. I mean... there probably is, but it's not really worth it.
|
There's a bunch of methods you can use to iterate through them correctly.
|
Probably, but considering most strings are alphanumerical, I think it's simpler just to keep it alphabetically ordered. Not to mention RC isn't going to be updated ANY.
|
Then don't use clientr. variables for inventory systems! ^^
By the way, you could always sort(), loadvarsfromarray(), etc. |
Quote:
|
Quote:
|
Quote:
The way I see it, none of the changes that happen to the game really have an effect on me that much as I never really played Graal except for the first 4 months that I started (back in 99/2000 ish). I just was gone for a while because I was living at my ex-girlfriend's house for about a month. |
| All times are GMT +2. The time now is 08:09 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.