.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #11  
Old December 6th, 2003, 03:14 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: PHP Help Needed

Quote:
Originally posted by Ruatha:
quote:
Originally posted by Imperator Fyron:
Sorting a normal array is not a problem. I could just call the asort() function if that were the case. The problem is in sorting a 2D array.
Yeah, that's what I meant with Multiarray, instead of simple array, my own vocabulary I guess....
That was posted before your edit.
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #12  
Old December 6th, 2003, 03:15 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: PHP Help Needed

Quote:
How about making a simple 1D array also with only filenamess, and then sort that and let the multiarray (2D) follow in the sorting at the same time;
That seems like overkill, and it seems like there should be some way to sort 2D arrays... but it is worth a shot.

[ December 06, 2003, 01:17: Message edited by: Imperator Fyron ]
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #13  
Old December 6th, 2003, 03:16 AM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PHP Help Needed

Quote:
Originally posted by Imperator Fyron:
quote:
Originally posted by Ruatha:
quote:
Originally posted by Imperator Fyron:
Sorting a normal array is not a problem. I could just call the asort() function if that were the case. The problem is in sorting a 2D array.
Yeah, that's what I meant with Multiarray, instead of simple array, my own vocabulary I guess....
That was posted before your edit.

Sometimes a new post can be the proper choice instead of an edit I guess...

Edit:especially in a fast post thread as this, I won't edit much more..

[ December 06, 2003, 01:16: Message edited by: Ruatha ]
Reply With Quote
  #14  
Old December 6th, 2003, 03:17 AM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PHP Help Needed

Quote:
Originally posted by Imperator Fyron:
quote:
How about making a simple 1D array also with only filenamess, and then sort that and let the multiarray (2D) follow in the sorting at the same time;
That seems like overkill, and it seems like there should be some way to support 2D arrays... but it is worth a shot.
I agree, there must be an easy way, easy if one knows it...
Reply With Quote
  #15  
Old December 6th, 2003, 03:19 AM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PHP Help Needed

http://se2.php.net/array_multisort

can this be the answer?

[ December 06, 2003, 01:22: Message edited by: Ruatha ]
Reply With Quote
  #16  
Old December 6th, 2003, 03:22 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: PHP Help Needed

Well.. that sorted them in a new order... not alphabetical though.

http://imagemod.spaceempires.net/indexmda.php

Maybe my selection sort is a bit off...

Looking at link now.

[ December 06, 2003, 01:22: Message edited by: Imperator Fyron ]
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #17  
Old December 6th, 2003, 03:24 AM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PHP Help Needed

Strange indeed!

Edit: I can't really see any logic in the sorting

[ December 06, 2003, 01:25: Message edited by: Ruatha ]
Reply With Quote
  #18  
Old December 6th, 2003, 03:25 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: PHP Help Needed

Now look at it when it is using multisort... almost in order, but not quite.
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #19  
Old December 6th, 2003, 03:27 AM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PHP Help Needed

I think this takes sleeping on.....
Reply With Quote
  #20  
Old December 6th, 2003, 03:27 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: PHP Help Needed

I fail to see a problem with this line:

array_multisort($fileArray, SORT_ASC, SORT_STRING);
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
Reply

Bookmarks


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 On

Forum Jump


All times are GMT -4. The time now is 05:50 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.