Server crashes when loading from DB
#1

I was doing this and that and, the server crashes!

Tried some stuff and found out, that my "LoadBusiness" function crashes it (without it used it works). But I don't see whats wrong with it,please take a look
pawn Код:
stock LoadBusiness()
{
    for(new i; i<MAX_BUSINESS; i++)
    {
        new query[64],string[64];
        format(query,sizeof(query),"SELECT * FROM `Business` WHERE bizid = %d",i);
        mysql_query(query);
        mysql_store_result();
        if(mysql_num_rows() != 0)
        {
            mysql_fetch_row_format(query,"|");
            sscanf(query,"p<|>e<ds[64]dds[64]dddffffffdds[24]d>",BizInfo[i]);
            if(BizInfo[i][Owned]==0) {format(string,sizeof(string),"Verslas parduodamas\nKaina %d",BizInfo[i][Price]);}
            else if(BizInfo[i][Owned]>0) {format(string,sizeof(string),"%s\nIejimo kaina %d",BizInfo[i][BizName],BizInfo[i][EntrancePrice]);}
            BizInfo[i][HouseLabel]=Create3DTextLabel(string,0xFFFF00FF,BizInfo[i][enX],BizInfo[i][enY],BizInfo[i][enZ],25,BizInfo[i][VirtualWorld]);
        }
    }
    mysql_free_result();
    return 1;
}
Its only called on GameModeInit.
Reply


Messages In This Thread
Server crashes when loading from DB - by dusk - 31.03.2013, 15:58
Re: Server crashes when loading from DB - by Scenario - 31.03.2013, 16:19
Re: Server crashes when loading from DB - by dusk - 31.03.2013, 16:45
Re: Server crashes when loading from DB - by iggy1 - 31.03.2013, 16:55
Re: Server crashes when loading from DB - by dusk - 31.03.2013, 17:07
Re: Server crashes when loading from DB - by Scenario - 31.03.2013, 17:26
Re: Server crashes when loading from DB - by dusk - 31.03.2013, 17:36
Re: Server crashes when loading from DB - by dusk - 31.03.2013, 21:03
Re: Server crashes when loading from DB - by dusk - 01.04.2013, 08:12

Forum Jump:


Users browsing this thread: 4 Guest(s)