Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-30-2008, 06:40 AM
TheStan TheStan is offline
Stan?
Join Date: May 2008
Location: U.S.
Posts: 100
TheStan is on a distinguished road
Send a message via AIM to TheStan Send a message via MSN to TheStan
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.
Reply With Quote
  #2  
Old 06-30-2008, 06:51 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Why does it matter? Do you really need to edit these in RC?
__________________
Reply With Quote
  #3  
Old 06-30-2008, 07:03 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
yeah, I can see how it is silly and can be irritating, but it's no big deal.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #4  
Old 06-30-2008, 07:10 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by TheStan View Post
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.
Reply With Quote
  #5  
Old 06-30-2008, 08:55 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Twinny View Post
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.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #6  
Old 06-30-2008, 06:50 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Also, if you think about it ... it's just alphabetizing. There really is no other way to do it.
__________________
Reply With Quote
  #7  
Old 06-30-2008, 07:00 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Well, you could get the numbers, then make a function to reorder them ;o
(Page based inventory, yes? :] )
__________________
Reply With Quote
  #8  
Old 06-30-2008, 07:16 PM
TheStan TheStan is offline
Stan?
Join Date: May 2008
Location: U.S.
Posts: 100
TheStan is on a distinguished road
Send a message via AIM to TheStan Send a message via MSN to TheStan
Quote:
Originally Posted by Chompy View Post
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 View Post
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.
Reply With Quote
  #9  
Old 06-30-2008, 09:20 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
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.
Reply With Quote
  #10  
Old 06-30-2008, 09:24 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
There's a bunch of methods you can use to iterate through them correctly.
Reply With Quote
  #11  
Old 06-30-2008, 09:29 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
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.
Reply With Quote
  #12  
Old 06-30-2008, 11:44 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Then don't use clientr. variables for inventory systems!

By the way, you could always sort(), loadvarsfromarray(), etc.
__________________
Do it with a DON!
Reply With Quote
  #13  
Old 07-01-2008, 12:11 AM
TheStan TheStan is offline
Stan?
Join Date: May 2008
Location: U.S.
Posts: 100
TheStan is on a distinguished road
Send a message via AIM to TheStan Send a message via MSN to TheStan
Quote:
Originally Posted by zokemon View Post
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.
Reply With Quote
  #14  
Old 07-01-2008, 12:42 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by zokemon View Post
Then don't use clientr. variables for inventory systems!
I totally missed that major failing point!
Reply With Quote
  #15  
Old 07-01-2008, 11:03 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by TheStan View Post
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.
__________________
Do it with a DON!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:04 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.