![]() |
sortsub()
.sortsubascending(index)
.sortsubdescending(index) Will sort an array from the index provided in the subarrays. Example: this.test = {{"one",1},{"five",5},{"three",3},{"four",4},{"two ",2}}; this.test.sortsubascending(1); Will return: this.test = {{"one",1},{"two",2},{"three",3},{"four",4},{"five ",5}}; I'm not exactly sure of the syntax, but I'd like to see some way for this to be easily done. |
so basicly
temp.array.sortsubascending(index) temp.array.sortsubdescending(index) temp.array.subarray(index).sortascending() temp.array.subarray(index).sortdescending() Wouldn't something like that work? Edit: Nevermind, Wouldn't work as I don't think they return anything..? |
This kind of thing is possible if you use an array of TStaticVars and use sortbyvalue().
Quick Example: PHP Code:
NPC Code:1 one |
Quote:
|
The easiest way to sort such arrays right now is to set an attribute of each array member (temp.array[i].sortvalue = temp.array[i][1]) and then use sortbyvalue (temp.array.sortbyvalue("sortvalue","int",true))
|
All times are GMT +2. The time now is 12:03 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.