Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Order of Value in Clientr. Vars (https://forums.graalonline.com/forums/showthread.php?t=80311)

TheStan 06-30-2008 06:40 AM

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. :(

cbk1994 06-30-2008 06:51 AM

Why does it matter? Do you really need to edit these in RC?

Tigairius 06-30-2008 07:03 AM

yeah, I can see how it is silly and can be irritating, but it's no big deal.

Twinny 06-30-2008 07:10 AM

Quote:

Originally Posted by TheStan (Post 1400174)
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. :(

This is like.....so common. Windows folders do it. Linux CLI does it. I fail to see how it is, "silly" and why it should be addressed.

xXziroXx 06-30-2008 08:55 AM

Quote:

Originally Posted by Twinny (Post 1400182)
This is like.....so common. Windows folders do it. Linux CLI does it. I fail to see how it is, "silly" and why it should be addressed.

Agreed. :\

cbk1994 06-30-2008 06:50 PM

Also, if you think about it ... it's just alphabetizing. There really is no other way to do it.

Chompy 06-30-2008 07:00 PM

Well, you could get the numbers, then make a function to reorder them ;o
(Page based inventory, yes? :] )

TheStan 06-30-2008 07:16 PM

Quote:

Originally Posted by Chompy (Post 1400241)
Well, you could get the numbers, then make a function to reorder them ;o
(Page based inventory, yes? :] )

I kind of went serverside and got the info directly from the Mud objects instead.
And yes it is. :o

Quote:

Originally Posted by Twinny (Post 1400182)
This is like.....so common. Windows folders do it. Linux CLI does it. I fail to see how it is, "silly" and why it should be addressed.

All I'm saying is, if you wanted to get the proper numbered order 1 - 12 (Especially using getstringkeys() and a for() loop like I was doing) it is a bit irritating.

DustyPorViva 06-30-2008 09:20 PM

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.

DrakilorP2P 06-30-2008 09:24 PM

There's a bunch of methods you can use to iterate through them correctly.

DustyPorViva 06-30-2008 09:29 PM

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.

zokemon 06-30-2008 11:44 PM

Then don't use clientr. variables for inventory systems! ^^

By the way, you could always sort(), loadvarsfromarray(), etc.

TheStan 07-01-2008 12:11 AM

Quote:

Originally Posted by zokemon (Post 1400280)
Then don't use clientr. variables for inventory systems! ^^

By the way, you could always sort(), loadvarsfromarray(), etc.

Point well taken, from Drakilor as well...and on a side note, you're still here Zero? I thought you were long gone! Lol.

Twinny 07-01-2008 12:42 AM

Quote:

Originally Posted by zokemon (Post 1400280)
Then don't use clientr. variables for inventory systems! ^^

I totally missed that major failing point! >_<

zokemon 07-01-2008 11:03 AM

Quote:

Originally Posted by TheStan (Post 1400287)
and on a side note, you're still here Zero? I thought you were long gone! Lol.

I'll never be able to leave Graal. In fact, I never will be posting a good bye thread that relates to Graal as a whole.

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.