Script makes a samp bug happen
#1

Okay today i was trying to get the loading of the clubs done but for some reason it makes the
Код:
KICKING X Because they didnt log on to the game.
bug happen. and also server crashes afterwards. this is the code:
pawn Код:
mysql_function_query(Handle, "SELECT * FROM Clubs", true, "LoadClubs", "");
That was the loading function placed under onGameModeInit
Now the part where it all gets loaded:
pawn Код:
forward LoadClubs();
public LoadClubs()
{
    new rows, fields, i=0;
    cache_get_data( rows, fields, Handle);
    if(!rows)
    {
        print("Clubs table is empty, no results found.");
        return 1;
    }
    while(rows > i < MAX_CLUBS)
    {
        AClubData[i][ID] = cache_get_row_int(i, 0);
        cache_get_row(i, 2, AClubData[i][Owner], Handle, 24);
        AClubData[i][ClubX] = cache_get_row_float(i, 21);
        AClubData[i][ClubY] = cache_get_row_float(i, 22);
        AClubData[i][ClubZ] = cache_get_row_float(i, 23);
        AClubData[i][PickUpID] = CreateDynamicPickup(1273, 1, AClubData[i][ClubX], AClubData[i][ClubY], AClubData[i][ClubZ], -1);
    }
    return 1;
}
What is wrong in this code that it can trigger such a big bug
Reply
#2

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)