08.05.2018, 05:26
Im using crashdetect to get the errors in my server, however objects i added are still working and commands too, but i just spawn in blueberry.
"MapChange" is a 1 second timer which if it reaches 0 then it changes map, i also added when it reach 80 the game has started and randomplayer is chosen as a zombie.
Here is the code
pawn Код:
07:21:10] [debug] Run time error 4: "Array index out of bounds"
[07:21:10] [debug] AMX backtrace:
[07:21:10] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:11] [debug] Run time error 4: "Array index out of bounds"
[07:21:11] [debug] AMX backtrace:
[07:21:11] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:12] [debug] Run time error 4: "Array index out of bounds"
[07:21:12] [debug] AMX backtrace:
[07:21:12] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:13] [debug] Run time error 4: "Array index out of bounds"
[07:21:13] [debug] AMX backtrace:
[07:21:13] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:14] [debug] Run time error 4: "Array index out of bounds"
[07:21:14] [debug] AMX backtrace:
[07:21:14] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:15] [debug] Run time error 4: "Array index out of bounds"
[07:21:15] [debug] AMX backtrace:
[07:21:15] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:16] [debug] Run time error 4: "Array index out of bounds"
[07:21:16] [debug] AMX backtrace:
[07:21:16] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:17] [debug] Run time error 4: "Array index out of bounds"
[07:21:17] [debug] AMX backtrace:
[07:21:17] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:18] [debug] Run time error 4: "Array index out of bounds"
[07:21:18] [debug] AMX backtrace:
[07:21:18] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:19] [debug] Run time error 4: "Array index out of bounds"
[07:21:19] [debug] AMX backtrace:
[07:21:19] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:20] [debug] Run time error 4: "Array index out of bounds"
[07:21:20] [debug] AMX backtrace:
[07:21:20] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:21] [debug] Run time error 4: "Array index out of bounds"
[07:21:21] [debug] AMX backtrace:
[07:21:21] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:22] [debug] Run time error 4: "Array index out of bounds"
[07:21:22] [debug] AMX backtrace:
[07:21:22] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:23] [debug] Run time error 4: "Array index out of bounds"
[07:21:23] [debug] AMX backtrace:
[07:21:23] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:24] [debug] Run time error 4: "Array index out of bounds"
[07:21:24] [debug] AMX backtrace:
[07:21:24] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:25] [debug] Run time error 4: "Array index out of bounds"
[07:21:25] [debug] AMX backtrace:
[07:21:25] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:26] [debug] Run time error 4: "Array index out of bounds"
[07:21:26] [debug] AMX backtrace:
[07:21:26] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:27] [debug] Run time error 4: "Array index out of bounds"
[07:21:27] [debug] AMX backtrace:
[07:21:27] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:28] [debug] Run time error 4: "Array index out of bounds"
[07:21:28] [debug] AMX backtrace:
[07:21:28] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:29] [debug] Run time error 4: "Array index out of bounds"
[07:21:29] [debug] AMX backtrace:
[07:21:29] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:30] [debug] Run time error 4: "Array index out of bounds"
[07:21:30] [debug] AMX backtrace:
[07:21:30] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:31] [debug] Run time error 4: "Array index out of bounds"
[07:21:31] [debug] AMX backtrace:
[07:21:31] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:32] [debug] Run time error 4: "Array index out of bounds"
[07:21:32] [debug] AMX backtrace:
[07:21:32] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:33] [debug] Run time error 4: "Array index out of bounds"
[07:21:33] [debug] AMX backtrace:
[07:21:33] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:34] [debug] Run time error 4: "Array index out of bounds"
[07:21:34] [debug] AMX backtrace:
[07:21:34] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:36] [debug] Run time error 4: "Array index out of bounds"
[07:21:36] [debug] AMX backtrace:
[07:21:36] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:37] [debug] Run time error 4: "Array index out of bounds"
[07:21:37] [debug] AMX backtrace:
[07:21:37] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:38] [debug] Run time error 4: "Array index out of bounds"
[07:21:38] [debug] AMX backtrace:
[07:21:38] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:39] [debug] Run time error 4: "Array index out of bounds"
[07:21:39] [debug] AMX backtrace:
[07:21:39] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
[07:21:40] [debug] Run time error 4: "Array index out of bounds"
[07:21:40] [debug] AMX backtrace:
[07:21:40] [debug] #0 000517dc in public MapChange () at C:\Users\admin\Desktop\SAMP Server\gamemodes\zm.pwn:810
Here is the code
pawn Код:
public MapChange()
{
if(MapTime == 0)
{
TextDrawSetString(Timesec, "evac");
for(new i = 0; i < MAX_PLAYERS; i++)
{
SCM(i, COLOR_ORANGE, "Evacuation Support: Make your way to the evac support in 60 seconds.");
if(CurrentMap == 1)
{
MoveDynamicObject(evacobj[0], 1797.32031, -1925.73962, 7.6475, 15);
}
else if(CurrentMap == 3)
{
MoveDynamicObject(evacobj[1], -632.72577, 2045.49438, 55.13554, 15);
}
else if(CurrentMap == 6)
{
MoveDynamicObject(evacobj[2], -2440.0000000,-582.9000200,125.0000000, 5);
}
if(pTeam[i] == 1)
{
Evac[i] = 1;
}
SetPlayerCheckpoint(i, eX, eY, eZ, 5.0);
}
KillTimer(MapTimer);
SetTimer("EvacTime", 60000, 0);
return 1;
}
if(MapTime == 80)
{
HasStarted = 1;
for(new i = 0; i < MAX_PLAYERS; i++)
{
DisablePlayerCheckpoint(i);
}
if(zcount == 0)
{
new randomplayer = Iter_Random(Player);
pTeam[randomplayer] = 2; // LINE 810
SetPlayerColor(randomplayer, COLOR_SANDYBROWN);
SetPlayerSkin(randomplayer, 241);
SetPlayerArmour(randomplayer, 50);
pZom[randomplayer] = 4;
ResetPlayerWeapons(randomplayer);
SetPlayerTeam(randomplayer, 2);
TogglePlayerControllable(randomplayer, true);
}
}
MapTime--;
new string[128];
format(string, sizeof(string), "%d", MapTime);
TextDrawSetString(Timesec, string);
format(string, sizeof(string), "HUMANS: %d", hcount);
TextDrawSetString(humans, string);
format(string, sizeof(string), "ZOMBIES: %d", zcount);
TextDrawSetString(zombies, string);
return 1;
}