SA-MP Forums Archive
Sorting problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Sorting problem (/showthread.php?tid=472092)



Sorting problem - Baltazar - 26.10.2013

I'm using this function: https://sampforum.blast.hk/showthread.php?tid=343172

Код:
enum Info { index, Str[64] }
new var[10][Info];

// assigning some strings to var[][Str]

SortDeepArray(var, string:Str);
printf(var[0][string]);
prints nothing. Why?


Re: Sorting problem - Patrick - 26.10.2013

You're printing it wrong, clearly says on the topic
Quote:
Originally Posted by Slice
Посмотреть сообщение
printf(" array[%d] = {%d, %d}", i, array[i][0], array[i][1]);
pawn Код:
printf(var[0][string]);

//Should be

printf("%s", var[0][string]); //Integer '%s' because it's a string



Re: Sorting problem - Baltazar - 26.10.2013

Thanks, mate +rep