[HELP]Server Crash - Located crash line with CrashDETECT -
#1

pawn Code:
forward scoretimer();
public scoretimer()
{
    for(new i; i<MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        seconds[i] ++;
        if(seconds[i] == 3600)
        {
            SetPlayerScore(i, GetPlayerScore(i) + 1);
            seconds[i] = 0;
        }
    }
    return 1;
}
Why the above code crashes the server? Can anyone fix the code & also explain me why it crashes?
Reply
#2

Let's Fix the Line


forward scoretimer();
public scoretimer()


I think this line is problme becouse you doesn't made the score timer, with (1000,1)

Okay Thanks..

Please REP ME
Reply
#3

lol, nice mars.
Reply
#4

I doubt any of those replies helped you, since it's a script-based problem you could expect more professional help and attention in the Scripting Help Section.
Reply
#5

Quote:
Originally Posted by Marsss
View Post
Let's Fix the Line


forward scoretimer();
public scoretimer()


I think this line is problme becouse you doesn't made the score timer, with (1000,1)

Okay Thanks..

Please REP ME



Why are you doing this?
pawn Code:
if(!IsPlayerConnected(i)) continue;
If this player isn't connected then continue the loop?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)