It would be strange if it worked. After all you are trying to store string in a single variable. Try this:
PHP Code:
new count[32], count1[32], count2, count3, count4, count5
SQL_ReadResult(Query,0, count, 31)
SQL_ReadResult(Query,1, count1, 31)
count2 = SQL_ReadResult(Query,2)
count3 = SQL_ReadResult(Query,3)
count4 = SQL_ReadResult(Query,4)
count5 = SQL_ReadResult(Query,5)
and remove that:
PHP Code:
if(count == 0)
count = 1
About the 2nd problem:
PHP Code:
if(SQL_ReadResult(Query,0) || SQL_ReadResult(Query,0) == 0)
will give you the same result as
Both of them are wrong anyway. You should change it to:
PHP Code:
if(SQL_MoreResults(Query))
Your way of creating toplist is very inefficient.
Why do you send 15 queries to mysql to get the toplist when you could get it with only 1 query?
I would code it this way:
1) Load toplist from mysql and store it in memory on plugin_init
2) Load player stats and store them in memory on client_authorized
3) Update toplist stored in memory when player gains points
4) Display toplist stored in memory when player wants to see toplist
5) Save player stats on client_disconnect
__________________