server crash - 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: server crash (
/showthread.php?tid=538091)
server crash -
ajwar - 19.09.2014
I find out that this script couses server crash, but cant find out what exactly couses crash. Player's stays shown in playerlist until i restart server and it's impossible to join server. Server ping stays still. What could couse crash? It crashes only in following situation: Player folds (PokerFoldHand ), leaves table (LeavePokerTable ), joins again and when there is 5 seconds left (PokerTable[tableid][pkrDelay] == 5) until the round starts server freezes.
pawn Код:
if(PokerTable[tableid][pkrRound] == 0 && PokerTable[tableid][pkrDelay] == 5)
{
for(new i = 0; i < 6; i++) {
new playerid = PokerTable[tableid][pkrSlot][i];
if(playerid != -1) {
SetPVarInt(playerid, "pkrStatus", 1);
}
}
PokerAssignBlinds(tableid);
}
Functions PokerAssignBlinds,PokerFoldHand,LeavePokerTable can be found on:
http://pastebin.com/3FtF3MAc
Re: server crash -
ajwar - 22.09.2014
Any suggestions?
I found that the problem is in while or for cycles, but can't find out why.