Script makes a samp bug happen - 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: Script makes a samp bug happen (
/showthread.php?tid=456602)
Script makes a samp bug happen -
thimo - 06.08.2013
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
Re: Script makes a samp bug happen -
thimo - 07.08.2013
Bump