Server doesnt let more than 10 players to log in (mysql bug)
#1

Hi all, i'm trying to make a event point system, /winers based in mysql.
So yea heres the command.

PHP код:
CMD:winers(playeridparmas[])
{
    
mysql_tquery(sql_connect"SELECT * FROM `users` ORDER BY `eventpoints` DESC LIMIT 10""OnQueryFinishup""ii"THREAD_EVENTWINERplayerid);
    return 
1;
}
        case 
THREAD_EVENTWINER:
        {
            new 
username[MAX_PLAYER_NAME], eventpoints[24];
            
SendClientMessage(extraidCOLOR_GREEN"---- Event Winners ----");
            for(new 
0rows++)
            {
                
cache_get_field_content(i"username"username);
                
cache_get_field_content(i"eventpoints"eventpoints);
                
SendClientMessageEx(extraidCOLOR_GREY2"%s - Event points: %d"usernameeventpoints);
            }
        } 
Now everything runs fine, there's no mysql error given i cant get more than 10 players in the server, it start crashing the others for some reason, probably i missed up something?
Reply
#2

What OnPlayerConnect with MySQL has to do with this command ?
Either your title is misleading or you have posted wrong code.
Reply
#3

Nothing man i just created this command right now

case THREAD_EVENTWINER: is under OnQueryFinishup
Reply
#4

What about this and number 10 in it ?

Код:
 mysql_tquery(sql_connect, "SELECT * FROM `users` ORDER BY `eventpoints` DESC LIMIT 10", "OnQueryFinishup", "ii", THREAD_EVENTWINER, playerid);
Reply
#5

Quote:
Originally Posted by Hunud
Посмотреть сообщение
What about this and number 10 in it ?

Код:
 mysql_tquery(sql_connect, "SELECT * FROM `users` ORDER BY `eventpoints` DESC LIMIT 10", "OnQueryFinishup", "ii", THREAD_EVENTWINER, playerid);
All the LIMIT 10 does is it finds the first 10 results from your query and thats it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)