SQLite command crashing the server
#9

Try to debug

pawn Код:
COM(aka)
{
    new id;
    if(sscanf(params,"u",id) && id == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"USAGE: /aka [playerid]");
    new query[125],ip[16],hash[64],name[24];
    GetPlayerIp(id,ip,sizeof(ip));
    format(query,sizeof(query),"SELECT * FROM iprecords WHERE name = '%s' OR ip = '%s' ORDER BY time DESC LIMIT 0,30",NAME(id),ip);
    print(query);
    new DBResult:result = db_query(database,query);
    printf("db_num_rows: %d",db_num_rows(result));
    new string[5012];
    do
    {
        db_get_field_assoc(result,"name",name,sizeof(name));
        db_get_field_assoc(result,"ip",ip,sizeof(ip));
        db_get_field_assoc(result,"hash",hash,sizeof(hash));
        format(string,sizeof(string),"%sName: {FFFF00}%s{FFFFFF} | IP: {FFFF00}%s{FFFFFF} | Hash: {FFFF00}%d{FFFFFF}\n",string,name,ip,udb_hash(hash));
    }
    while(db_next_row(result));
    db_free_result(result);
    ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"Also Known As (Latest 30 results)",string,"Close","");
    return 1;
}
and show here my prints, if still try limit 0,3 and if still try new string[1024];
Reply


Messages In This Thread
SQLite command crashing the server - by xXShadowXx - 08.12.2013, 14:02
Re: SQLite command crashing the server - by FahadKing07 - 08.12.2013, 14:05
Re: SQLite command crashing the server - by xXShadowXx - 08.12.2013, 14:10
Re: SQLite command crashing the server - by FahadKing07 - 08.12.2013, 14:26
Re: SQLite command crashing the server - by xXShadowXx - 08.12.2013, 14:27
Re: SQLite command crashing the server - by xXShadowXx - 09.12.2013, 15:20
Re: SQLite command crashing the server - by Emmet_ - 09.12.2013, 15:52
Re: SQLite command crashing the server - by xXShadowXx - 09.12.2013, 15:59
Re: SQLite command crashing the server - by Jefff - 09.12.2013, 17:08
Re: SQLite command crashing the server - by xXShadowXx - 09.12.2013, 17:18

Forum Jump:


Users browsing this thread: 1 Guest(s)