SA-MP Forums Archive
Arrays problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Arrays problem (/showthread.php?tid=497942)



Arrays problem - Equuuuin0X - 01.03.2014

[06:47:03] [join] BradleyQuarter has joined the server (0:115.124.67.253)
[06:47:02] Incoming connection: 115.124.67.253:4660
[06:47:01] [debug] #0 000af3f4 in public PingKick () from codw.amx
[06:47:01] [debug] AMX backtrace:
[06:47:01] [debug] Accessing element at index 4 past array upper bound 3
[06:47:01] [debug] Run time error 4: "Array index out of bounds"
[06:46:05] [debug] #0 000af3f4 in public PingKick () from codw.amx
[06:46:05] [debug] AMX backtrace:
[06:46:05] [debug] Accessing element at index 4 past array upper bound 3
[06:46:05] [debug] Run time error 4: "Array index out of bounds"
[06:45:08] [debug] #0 000af3f4 in public PingKick () from codw.amx
[06:45:08] [debug] AMX backtrace:
[06:45:08] [debug] Accessing element at index 4 past array upper bound 3
[06:45:08] [debug] Run time error 4: "Array index out of bounds"

any idea ?

http://pastebin.com/3hHS3J2u


Re: Arrays problem - Konstantinos - 01.03.2014

Use debug info: https://github.com/Zeex/samp-plugin-...ith-debug-info
for more information such as line etc.

Update the crashdetect plugin to its latest version if you don't use it already, which is 4.13: https://github.com/Zeex/samp-plugin-...ases/tag/v4.13

Re-compile the scripts and start the server. If it prints anything with debug prefix, post the server log again.


Re: Arrays problem - Equuuuin0X - 01.03.2014

Alright, one thing you should know, the errors appears in the VPS
when I use home hosting, It's fixed.

anyway, this is the results
Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:          13556 bytes
Code size:           923072 bytes
Data size:          1248092 bytes
Stack/heap size:     580000 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 2764720 bytes
I have not yet seen the server log, posting it in a few mins.

Mind helping me ?
pls register at the server, so I can see what crashdetect says.


Re: Arrays problem - Konstantinos - 01.03.2014

I'll be waiting for the results of the server log.

Remove the server IP as it's considered as advertising which is against the forum rules.


Re: Arrays problem - Equuuuin0X - 01.03.2014

Damn man, I need a man to enter the server, to see the server logs, as If I go by myself, it shows nothing on server logs.

Nevermind

heres the logs

Код:
[13:08:12] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[13:08:12] [debug] AMX backtrace:
[13:08:12] [debug]  Accessing element at index 4 past array upper bound 3
[13:08:12] [debug] Run time error 4: "Array index out of bounds"
[13:07:15] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[13:07:15] [debug] AMX backtrace:
[13:07:15] [debug]  Accessing element at index 4 past array upper bound 3
[13:07:15] [debug] Run time error 4: "Array index out of bounds"
[13:06:19] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[13:06:19] [debug] AMX backtrace:
[13:06:19] [debug]  Accessing element at index 4 past array upper bound 3
[13:06:19] [debug] Run time error 4: "Array index out of bounds"
[13:05:22] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[13:05:22] [debug] AMX backtrace:
[13:05:22] [debug]  Accessing element at index 4 past array upper bound 3
[13:05:22] [debug] Run time error 4: "Array index out of bounds"
[13:04:25] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[13:04:25] [debug] AMX backtrace:
[13:04:25] [debug]  Accessing element at index 4 past array upper bound 3
[13:04:25] [debug] Run time error 4: "Array index out of bounds"
[13:03:28] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[13:03:28] [debug] AMX backtrace:
[13:03:28] [debug]  Accessing element at index 4 past array upper bound 3
[13:03:28] [debug] Run time error 4: "Array index out of bounds"
[13:02:32] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[13:02:32] [debug] AMX backtrace:
[13:02:32] [debug]  Accessing element at index 4 past array upper bound 3
[13:02:32] [debug] Run time error 4: "Array index out of bounds"
[13:01:35] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[13:01:35] [debug] AMX backtrace:
[13:01:35] [debug]  Accessing element at index 4 past array upper bound 3
[13:01:35] [debug] Run time error 4: "Array index out of bounds"
[13:00:38] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[13:00:38] [debug] AMX backtrace:
[13:00:38] [debug]  Accessing element at index 4 past array upper bound 3
[13:00:38] [debug] Run time error 4: "Array index out of bounds"
[12:59:41] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[12:59:41] [debug] AMX backtrace:
[12:59:41] [debug]  Accessing element at index 4 past array upper bound 3
[12:59:41] [debug] Run time error 4: "Array index out of bounds"
[12:58:44] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[12:58:44] [debug] AMX backtrace:
[12:58:44] [debug]  Accessing element at index 4 past array upper bound 3
[12:58:44] [debug] Run time error 4: "Array index out of bounds"
[12:57:48] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[12:57:48] [debug] AMX backtrace:
[12:57:48] [debug]  Accessing element at index 4 past array upper bound 3
[12:57:48] [debug] Run time error 4: "Array index out of bounds"
[12:56:51] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[12:56:51] [debug] AMX backtrace:
[12:56:51] [debug]  Accessing element at index 4 past array upper bound 3
[12:56:51] [debug] Run time error 4: "Array index out of bounds"
[12:55:54] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[12:55:54] [debug] AMX backtrace:
[12:55:54] [debug]  Accessing element at index 4 past array upper bound 3
[12:55:54] [debug] Run time error 4: "Array index out of bounds"
[12:54:57] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[12:54:57] [debug] AMX backtrace:
[12:54:57] [debug]  Accessing element at index 4 past array upper bound 3
[12:54:57] [debug] Run time error 4: "Array index out of bounds"
[12:54:01] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[12:54:01] [debug] AMX backtrace:
[12:54:01] [debug]  Accessing element at index 4 past array upper bound 3
[12:54:01] [debug] Run time error 4: "Array index out of bounds"
[12:53:04] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[12:53:04] [debug] AMX backtrace:
[12:53:04] [debug]  Accessing element at index 4 past array upper bound 3
[12:53:04] [debug] Run time error 4: "Array index out of bounds"
[12:52:07] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[12:52:07] [debug] AMX backtrace:
[12:52:07] [debug]  Accessing element at index 4 past array upper bound 3
[12:52:07] [debug] Run time error 4: "Array index out of bounds"
[12:51:10] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[12:51:10] [debug] AMX backtrace:
[12:51:10] [debug]  Accessing element at index 4 past array upper bound 3
[12:51:10] [debug] Run time error 4: "Array index out of bounds"
[12:50:13] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[12:50:13] [debug] AMX backtrace:
[12:50:13] [debug]  Accessing element at index 4 past array upper bound 3
[12:50:13] [debug] Run time error 4: "Array index out of bounds"
[12:49:17] [debug] #0 000d7de8 in public PingKick () at D:\Critical DM by EquinoXFlaken\gamemodes\codw.pwn:14092
[12:49:17] [debug] AMX backtrace:
[12:49:17] [debug]  Accessing element at index 4 past array upper bound 3
[12:49:17] [debug] Run time error 4: "Array index out of bounds"
line 14092:

Код:
			PlayerInfo[i][pPing][PingPos] = GetPlayerPing(i);



Re: Arrays problem - Konstantinos - 01.03.2014

Post the line 14092.


Re: Arrays problem - Equuuuin0X - 01.03.2014

Код:
			PlayerInfo[i][pPing][PingPos] = GetPlayerPing(i);



Re: Arrays problem - Smileys - 01.03.2014

give us your PlayerInfo array.

something like

pawn Код:
new PlayerInfo[ MAX_PLAYERS ] ..........;
paste it here.


Re: Arrays problem - Konstantinos - 01.03.2014

pawn Код:
PlayerInfo[i][pPing][PingPos] = GetPlayerPing(i);
Is pPing an array of size 4? I mean in your enum:
pawn Код:
pPing[4]
and PingPos was 4 so it caused the run time error.

How did you define PING_MAX_EXCEEDS?


Re: Arrays problem - Equuuuin0X - 01.03.2014

#define PING_MAX_EXCEEDS 4

like that,

Код:
enum PlayerData
{
	PingCount,
	PingTime,
	BotPing,
	blip,
	blipS,
	pPing[PING_MAX_EXCEEDS],

};
note that, when the errors appears, server crashed,and goes offline