Quote:
Originally Posted by Sylwester
SortCustom2D is using QuickSort algorithm. I dont know what version does it use exactly but some of them can run your system out of stack space even if you have just several thousands elements in your array, as it is massively recursive sort. To prevent this error there are implementations of QuickSort that use iteration with stack instead of recursion, but you would have to write it yourself or ask someone to make it for you.
|
like XxAvalanchexX one? by executing SortCustom2D each x-arrays?
Quote:
Originally Posted by _Master_
Let me see if I get this right... you have a 4000+ array and you want to sort it... in PAWN... in a thread with a time-limited execution... under HL ?!?
I'm not the biggest fan of SQL but in your case it's the ONLY solution.
EDIT: @Sylwester: Regrdless of the algorithm, the overhead is too much.
Even if the SortCustom2D works with ~3000 entries, it does not mean it's the right way to do this.
|
already thought of a mysql port but i was to lazy because it works pretty fine, till now.
Quote:
Originally Posted by XxAvalanchexX
That code looks familiar!!
To solve using huge arrays, I just decided to sort the entries as they came in. Check the source of the latest version of GunGame.
|
well i found it at the scripting forums. ;)
your code looks really awesome! (btw: thanks for your great brainbread stock files) but i also want to show up three ranks above/below a users rank.
[example]
so your code is not the best for me. i will take a look on your gungame_sql and do the mysql port. ;p
Quote:
Originally Posted by sawce
#pragma dynamic 32768
|
i will give it a try.
edit:works like a charm =)
Quote:
Originally Posted by sawce
Not everyone has access to an SQL server, and, so long as it is done someplace like mapload, that's not _that_ bad. Obviously SQL would be ideal, but it's not the end of the world.
@noname\: Can you provide me with the entire script + full database file to test something? You can send via PM if you don't want it to be public.
|
i have got a mysqld running. and it it is executed by user. ;/
sure. check your pm's.
thanks for your help!
__________________