Raised This Month: $ Target: $400
 0% 

Sorting an array..?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 12-28-2006 , 15:35   Re: Sorting an array..?
Reply With Quote #1

http://www.amxmodx.org/funcwiki.php?...sort&go=search
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 12-28-2006 , 15:36   Re: Sorting an array..?
Reply With Quote #2

Quote:
Originally Posted by P34nut View Post
hmm, looks like that's it, thx!
Deviance is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 12-29-2006 , 20:33   Re: Sorting an array..?
Reply With Quote #3

Damn, new problem!

For example..
Code:
new randomarray[4] randomarray[2] = 44 randomarray[1] = 2 randomarray[4] = 85 randomarray[3] = 99
How would i do so the array's number is still the same after i've sorted it?

Like...
Code:
new randomarray[4] randomarray[3] = 99 randomarray[4] = 85 randomarray[2] = 44 randomarray[1] = 2
Instead of...
Code:
new randomarray[4] randomarray[2] = 99 randomarray[1] = 85 randomarray[4] = 44 randomarray[3] = 2
Deviance is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 12-29-2006 , 20:37   Re: Sorting an array..?
Reply With Quote #4

Copy the array before you sort it? Or at least that is what I did in my C# project.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
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 -4. The time now is 22:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode