server crashing (+rep for solution) please!!!
#1

[10/09/2012 01:09:38] [debug] Run time error 4: "Array index out of bounds"
[10/09/2012 01:09:38] [debug] Accessing element at index 306 past array upper bound 301
[10/09/2012 01:09:38] [debug] AMX backtrace:
[10/09/2012 01:09:38] [debug] #0 00045880 in public OnPlayerStateChange (playerid=16, newstate=2, oldstate=1) at C:\Documents and Settings\cvl\Desktop\sv 0.3e\gamemodes\Gf.pwn:7836

Line:
Код:
        if(newcar == sds1 || newcar == sds2 || newcar == sds3 || newcar == sds4 || newcar == sds5 || newcar == sds6)
        {
          if(TakingLesson[playerid] == 1)
          {
             KillTimer(dmvtimer1);
             SendClientMessage(playerid,COLOR_WHITE,"** Ai la dispozitie {00bfff}75 {ffffff}secunde.");
             SendClientMessage(playerid,COLOR_WHITE,"** Condu cu grija pe partea dreapta si ai grija sa nu lovesti vehiculul.");
             CP[playerid] = 100;
             SetPlayerCheckpoint(playerid, 1042.3046,-1540.3511,13.0649,5.0);
          }
          else
          {
            SendClientMessage(playerid,COLOR_WHITE,"** Ne pare rau, dar acest vehicul este doar pentru cei care dau {00bfff}Scoala de Soferi{ffffff}.");
            RemovePlayerFromVehicle(playerid);
          }
        }
line 7835:else
line 7836:{




2.

[10/09/2012 01:10:55] [debug] Run time error 4: "Array index out of bounds"
[10/09/2012 01:10:55] [debug] Accessing element at index 65535 past array upper bound 499
[10/09/2012 01:10:55] [debug] AMX backtrace:
[10/09/2012 01:10:55] [debug] #0 0001b86c in public OnPlayerDeath (playerid=0, killerid=65535, reason=255) at C:\Documents and Settings\cvl\Desktop\sv 0.3e\gamemodes\Gm.pwn:4257

line 4257: killerteam = gTeam[killerid];



rest...

if (victimteam >= 3 && WantedPoints[playerid] > 0 && killerteam == 2)
{
SetPlayerFree(playerid,killerid, "Got Killed");
}

(+rep for solution) (+rep for solution) (+rep for solution)
Reply
#2

+rep !!! (up)
Reply
#3

Show me OnPlayerDeath and the definition of gTeam
Reply
#4

OnPlayerDeath its too big....
ps:

static gTeam[MAX_PLAYERS];
Reply
#5

+rep
Reply
#6

+rep
Reply
#7

please stop spamming and show onplayerdeath if u want ur problem to be fixed..
Reply
#8

pawn Код:
killerteam = IsPlayerConnected( killerid ) ? gTeam[killerid] : NO_TEAM;
Solution for the 2nd one ^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)