loop error
#1

Код:
[21:50:40] [debug] Run time error 4: "Array index out of bounds"
[21:50:40] [debug]  Accessing element at index 2000 past array upper bound 1999
[21:50:40] [debug] AMX backtrace:
[21:50:40] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:40] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2000) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:40] [debug] Run time error 4: "Array index out of bounds"
[21:50:40] [debug]  Accessing element at index 2001 past array upper bound 1999
[21:50:40] [debug] AMX backtrace:
[21:50:40] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:40] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2001) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:40] [debug] Run time error 4: "Array index out of bounds"
[21:50:40] [debug]  Accessing element at index 2002 past array upper bound 1999
[21:50:40] [debug] AMX backtrace:
[21:50:40] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:40] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2002) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:40] [debug] Run time error 4: "Array index out of bounds"
[21:50:40] [debug]  Accessing element at index 2003 past array upper bound 1999
[21:50:40] [debug] AMX backtrace:
[21:50:40] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:40] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2003) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:40] [debug] Run time error 4: "Array index out of bounds"
[21:50:40] [debug]  Accessing element at index 2004 past array upper bound 1999
[21:50:40] [debug] AMX backtrace:
[21:50:40] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:40] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2004) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:40] [debug] Run time error 4: "Array index out of bounds"
[21:50:40] [debug]  Accessing element at index 2005 past array upper bound 1999
[21:50:40] [debug] AMX backtrace:
[21:50:40] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:40] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2005) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:40] [debug] Run time error 4: "Array index out of bounds"
[21:50:40] [debug]  Accessing element at index 2006 past array upper bound 1999
[21:50:40] [debug] AMX backtrace:
[21:50:40] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:40] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2006) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:40] [debug] Run time error 4: "Array index out of bounds"
[21:50:40] [debug]  Accessing element at index 2007 past array upper bound 1999
[21:50:40] [debug] AMX backtrace:
[21:50:40] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:40] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2007) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2008 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2008) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2009 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2009) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2010 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2010) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2011 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2011) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2012 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2012) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2013 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2013) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2014 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2014) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2015 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2015) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2016 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2016) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2017 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2017) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2018 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2018) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2019 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2019) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2020 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2020) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2021 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2021) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2022 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2022) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2023 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2023) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2024 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2024) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2025 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2025) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2026 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2026) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2027 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2027) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2028 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2028) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:41] [debug] Run time error 4: "Array index out of bounds"
[21:50:41] [debug]  Accessing element at index 2029 past array upper bound 1999
[21:50:41] [debug] AMX backtrace:
[21:50:41] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:41] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2029) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:42] [debug] Run time error 4: "Array index out of bounds"
[21:50:42] [debug]  Accessing element at index 2030 past array upper bound 1999
[21:50:42] [debug] AMX backtrace:
[21:50:42] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:42] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2030) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:42] [debug] Run time error 4: "Array index out of bounds"
[21:50:42] [debug]  Accessing element at index 2031 past array upper bound 1999
[21:50:42] [debug] AMX backtrace:
[21:50:42] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:42] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2031) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:42] [debug] Run time error 4: "Array index out of bounds"
[21:50:42] [debug]  Accessing element at index 2032 past array upper bound 1999
[21:50:42] [debug] AMX backtrace:
[21:50:42] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:42] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2032) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:42] [debug] Run time error 4: "Array index out of bounds"
[21:50:42] [debug]  Accessing element at index 2033 past array upper bound 1999
[21:50:42] [debug] AMX backtrace:
[21:50:42] [debug] #0 000628c8 in ?? (... <2 arguments>) at D:\Samp Server\gamemodes\ServerFile.pwn:4426
[21:50:42] [debug] #1 0000e830 in public OnPlayerExitVehicle (playerid=5, vehicleid=2033) at D:\Samp Server\pawno\include\YSI\y_hooks/impl.inc:1057
[21:50:42] [debug] Run time error 4: "Array index out of bounds"
[21:50:42] [debug]  Accessing element at index 2034 past array upper bound 1999
OnPlayerExitVehicle: http://pastebin.com/Emvaburq

All code is 105 lines.
Reply
#2

Hello!

How do you get the VehicleID 2001?

The maximal size of MAX_VEHICLES is 1999 or rather 2000...
If you call somewhere on OnPlayerExitVehicle? (maybe in a loop?)

Mencent
Reply
#3

Quote:

How do you get the VehicleID 2001?

i don't know.

Quote:

If you call somewhere on OnPlayerExitVehicle?

Nope.
Reply
#4

When you get this error? If you start the server or when?

Mencent
Reply
#5

For first time. I don't know 1 player do it... and when i kick him, it stop dumping this error.

Sorry for my bad En.
Reply
#6

How is the playerid 5? Is that a player or a bot?

Mencent
Reply
#7

player
Reply
#8

NEVER TRUST THE CLIENT! Always keep this in your mind. Hes spoofing fake ids which causes this debug.

Include sanity checks to fix this, sanity checks should be added under every callback you handle.

Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
	if (vehicleid >= MAX_VEHICLES || vehicleid < 0)
	{
		printf("[SANITY CHECK] OnPlayerExitVehicle | %i %i", playerid, vehicleid);
		SendClientMessage(playerid, -1, "HAHA! Fucker.");
		Kick(playerid);
		return 0; //kill it
	}
}
Reply
#9

Quote:
Originally Posted by Ralfie
Посмотреть сообщение
NEVER TRUST THE CLIENT! Always keep this in your mind. Hes spoofing fake ids which causes this debug.

Include sanity checks to fix this, sanity checks should be added under every callback you handle.

Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
	if (vehicleid >= MAX_VEHICLES || vehicleid < 0)
	{
		printf("[SANITY CHECK] OnPlayerExitVehicle | %i %i", playerid, vehicleid);
		SendClientMessage(playerid, -1, "HAHA! Fucker.");
		Kick(playerid);
		return 0; //kill it
	}
}
Thanks.
Reply


Forum Jump:


Users browsing this thread: