SA-MP Forums Archive
Commands out of sync - 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: Commands out of sync (/showthread.php?tid=301006)



Commands out of sync - Unknown123 - 02.12.2011

pawn Код:
public OnPlayerConnect(playerid)
{
    if(isPlayerWhiteListed(playerid))
    {
        SendClientMessage(playerid,-1,"Yes. you is whitelisted");
    }
    else SendClientMessage(playerid,-1,"No. you is not whitelisted"), checkPlayerIfBanned(playerid);
    return 1;
}

stock isPlayerWhiteListed(playerid)
{
    new string[81];
    sormat(string, sizeof(string), "SELECT `pName` FROM `wlist` WHERE `pName` = '%s'", playerName(playerid));
    mysql_query(string);
    mysql_store_result();
    if(mysql_num_rows() != 0 && mysql_ping(connection) != -1)
    {
        mysql_free_result();
        return 1;
    }
    mysql_free_result();
    return 0;
}
Код:
Error ID: 2014 | Error: Commands out of sync; you can't run this command now | Query: SELECT `pName` FROM `wlist` WHERE `pName` = 'Unknown123'
why i get this error?