Crashdetect
#1

I receive this messages:
Код:
[10:34:04] [debug] Run time error 4: "Array index out of bounds"
[10:34:04] [debug]  Accessing element at index 520 past array upper bound 264
[10:34:04] [debug] AMX backtrace:
[10:34:04] [debug] #0 00096344 in ?? (0x00000000, 0x00000002, 0x00000001) from BS_RP.amx
[10:34:04] [debug] #1 000064d0 in public OnPlayerStateChange (0x00000000, 0x00000002, 0x00000001) from BS_RP.amx
[10:35:15] [debug] Run time error 4: "Array index out of bounds"
[10:35:15] [debug]  Accessing element at index 65535 past array upper bound 99
[10:35:15] [debug] AMX backtrace:
[10:35:15] [debug] #0 0003a38c in ?? (0x00000000, 0x0000ffff, 0x000000ff) from BS_RP.amx
[10:35:15] [debug] #1 000059e4 in public OnPlayerDeath (0x00000000, 0x0000ffff, 0x000000ff) from BS_RP.amx
Reply
#2

Re-compile your script with -d3 flag: https://github.com/Zeex/samp-plugin-...ith-debug-info
it will give more information such as lines when a run time or server crash occurs and then restart the server and the next time you will get an output with [debug] prefix in console/server log, post it here.
Reply
#3

Here is it

Код:
[12:55:26] [debug] Run time error 4: "Array index out of bounds"
[12:55:26] [debug]  Accessing element at index 65535 past array upper bound 99
[12:55:26] [debug] AMX backtrace:
[12:55:26] [debug] #0 0004a6c8 in ?? (... <3 arguments>) at C:\Users\Infinity\Desktop\antic - samp\antic - samp\Balkan School RolePlay 0.3.7\gamemodes\BS_RP.pwn:6772
[12:55:26] [debug] #1 00006a44 in public OnPlayerDeath (playerid=0, killerid=65535, reason=255) at C:\Users\Infinity\Desktop\antic - samp\antic - samp\Balkan School RolePlay 0.3.7\pawno\include\YSI\y_hooks/impl.inc:753
Reply
#4

The above is in OnPlayerDeath. killerid is INVALID_PLAYER_ID and you used it in arrays.

It may be not only one so better to post OnPlayerDeath and prevent all of them.
Reply
#5

Onplayerdeath >>> http://pastebin.com/8BVkYRkw

Line 6772: WantedLevel[killerid] += 6;
Reply
#6

Replace:
pawn Код:
if(killerid != 255)
to:
pawn Код:
if(killerid != INVALID_PLAYER_ID)
and
pawn Код:
if(!IsACop(killerid))
{
    WantedLevel[killerid] += 6;
    SetPlayerCriminal(killerid,255, "Prvostepeno Ubistvo");
}
to:
pawn Код:
if(killerid != INVALID_PLAYER_ID && !IsACop(killerid))
{
    WantedLevel[killerid] += 6;
    SetPlayerCriminal(killerid,255, "Prvostepeno Ubistvo");
}
Reply
#7

Yeah, i do it, thank you so much! You can lock this
Reply
#8

Код:
[15:14:27] [debug] Run time error 4: "Array index out of bounds"
[15:14:27] [debug]  Accessing element at index 520 past array upper bound 264
[15:14:27] [debug] AMX backtrace:
[15:14:27] [debug] #0 00041e6c in public Itter_OnPlayerDisconnect (playerid=0, reason=2) at C:\Users\Infinity\Desktop\antic - samp\antic - samp\Balkan School RolePlay 0.3.7\gamemodes\BS_RP.pwn:6043
[15:14:27] [debug] #1 00014fa4 in public Streamer_OnPlayerDisconnect (playerid=0, reason=2) at C:\Users\Infinity\Desktop\antic - samp\antic - samp\Balkan School RolePlay 0.3.7\pawno\include\YSI\y_iterate.inc:909
[15:14:27] [debug] #2 00013ff8 in ?? (... <2 arguments>) at C:\Users\Infinity\Desktop\antic - samp\antic - samp\Balkan School RolePlay 0.3.7\pawno\include\streamer.inc:325
[15:14:27] [debug] #3 0000671c in public OnPlayerDisconnect (playerid=0, reason=2) at C:\Users\Infinity\Desktop\antic - samp\antic - samp\Balkan School RolePlay 0.3.7\pawno\include\YSI\y_hooks/impl.inc:661
[15:14:27] [debug] #4 native Kick () [00470330] from samp-server.exe
[15:14:27] [debug] #5 005d850c in public KickPlayerr (playerid=0) at C:\Users\Infinity\Desktop\antic - samp\antic - samp\Balkan School RolePlay 0.3.7\gamemodes\BS_RP.pwn:78897
New crashdetects
Reply
#9

Post OnPlayerDisconnect and line 6043.
Reply
#10

http://pastebin.com/C6suRpG5

I wrote something new in script, and i remember line 6043 is some of these:
Код:
	if (gLastCar[playerid] > 0)
	{
		gLastDriver[gLastCar[playerid]] = 300;
		if(PlayerInfo[playerid][pPhousekey] != gLastCar[playerid]-1)
		{
			gCarLock[gLastCar[playerid]] = 0;
			UnLockCar(gLastCar[playerid]);
		}
	}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)