Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-03-2008, 02:20 AM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
Quote:
Originally Posted by godofwarares View Post
...
Hey! It's me!


Quote:
Originally Posted by xXziroXx View Post
M-m-m-meeega Buuuump!


Is there a way to sort by value (well I know there's a sortmode = "value";, but keep reading!)? Sorting numbers does fishy sorting like... 12, 34, 260 would be sorted as:

12
260
32

A bit frustrating when making a shop GUI and want to sort it by item costs
The problem with the sorting is that it's sorted by the first letter of a string rather than the integer values of said numbers. I suppose you would have to get the elements from the list and parse them yourself, and then re-add them in that specific order, provided the list doesn't auto-sort.
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote
  #2  
Old 09-03-2008, 02:32 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 Programmer View Post
The problem with the sorting is that it's sorted by the first letter of a string rather than the integer values of said numbers. I suppose you would have to get the elements from the list and parse them yourself, and then re-add them in that specific order, provided the list doesn't auto-sort.
Yeah, I know, I was hoping I could avoid it though, say if Stefan implemented an actual value sort for numbers or something.
__________________
Follow my work on social media post-Graal:Updated august 2025.
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 05:24 AM.


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