Server freeze / Crash
#1

Okay, here is where it freezes:



What causes it is this:

OnGameModeInit(); No problem
pawn Код:
public OnGameModeInit()
{
    SetGameModeText("SF-RP v0.1b");
    AddPlayerClass(1,-2289.6543,211.1139,35.3125, 0,0,0,0,0,0,0);
    new Hour, Minute, Second;
    gettime(Hour, Minute, Second);
    SetWorldTime(Hour);
   
    mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
    mysql_debug(1);
   
    DisableInteriorEnterExits();
    loadarrowpickups();
    loadmaps();
    loadbusiness();
    loadhouses();
    SetTimer("MoneyTimer", 1000, 1);
    return 1;

}
Here is the "loadbusiness" stock, which contains a stock which crashes it.
pawn Код:
stock loadbusiness()
{
    for(new i=0; i<MAX_BUSINESSES; i++)
    {
        currbusiness += 1;
        LoadBusinessInfo(i); // When this is commented out, there is no crash
        CreatePickup(1272, 1, BVar[i][bpickupx], BVar[i][bpickupy], BVar[i][bpickupz], 0);
    }
    print("Buinesses Loaded");
}
This is the "LoadBusinessInfo" stock, which is what ultimately crashes the server.
pawn Код:
stock LoadBusinessInfo(iBusiness)
{
    new Query[700];
    mysql_query("SELECT * FROM businessinfo");
    while(mysql_fetch_row(Query))
    {
        sscanf(Query, "e<p<|>dfffs[28]s[24]dddddfff>", BVar[iBusiness][bid], BVar[iBusiness][bpickupx], BVar[iBusiness][bpickupy], BVar[iBusiness][bpickupz], BVar[iBusiness][bname],
        BVar[iBusiness][bowner], BVar[iBusiness][bprice], BVar[iBusiness][bpayout], BVar[iBusiness][blocked], BVar[iBusiness][benterable], BVar[iBusiness][binterior],
        BVar[iBusiness][bintx], BVar[iBusiness][binty], BVar[iBusiness][bintz], BVar[iBusiness][bInt]);
    }
    mysql_free_result();
    return 1;
}
Any ideas what I am doing wrong?
Reply


Messages In This Thread
Server freeze / Crash - by vIBIENNYx - 25.06.2012, 17:28
Re: Server freeze / Crash - by Jason` - 25.06.2012, 17:37
Re: Server freeze / Crash - by vIBIENNYx - 25.06.2012, 17:46
Re: Server freeze / Crash - by leonardo1434 - 25.06.2012, 17:52
Re: Server freeze / Crash - by Jason` - 25.06.2012, 17:53
Re: Server freeze / Crash - by vIBIENNYx - 25.06.2012, 18:45
Re: Server freeze / Crash - by dowster - 25.06.2012, 19:03
Re: Server freeze / Crash - by vIBIENNYx - 25.06.2012, 19:28
Re: Server freeze / Crash - by dowster - 25.06.2012, 19:34
Re: Server freeze / Crash - by dowster - 25.06.2012, 19:36

Forum Jump:


Users browsing this thread: 1 Guest(s)