Run time error 4: "Array index out of bounds"
#3

Sorry for delay in answer , well there is the complete log compiled with -d3 flag

Quote:

[01:01:58] [npc:join] Zombie_0 has joined the server (398:127.0.0.1)
[01:01:58] [npc:join] Zombie_1 has joined the server (397:127.0.0.1)
[01:01:58] [npc:join] Zombie_2 has joined the server (396:127.0.0.1)
[01:01:58] [npc:join] Zombie_3 has joined the server (395:127.0.0.1)
[01:01:58] [npc:join] Zombie_4 has joined the server (394:127.0.0.1)
[01:01:58] [npc:join] Zombie_5 has joined the server (393:127.0.0.1)
[01:01:58] [npc:join] Zombie_6 has joined the server (392:127.0.0.1)
[01:01:58] [npc:join] Zombie_7 has joined the server (391:127.0.0.1)
[01:01:58] [npc:join] Zombie_8 has joined the server (390:127.0.0.1)
[01:01:58] [npc:join] Zombie_9 has joined the server (389:127.0.0.1)
[01:01:58] [npc:join] Zombie_10 has joined the server (388:127.0.0.1)
[01:01:58] [npc:join] Zombie_11 has joined the server (387:127.0.0.1)
[01:01:58] [npcart] Zombie_11 has left the server (387:2)
[01:01:58] [debug] Run time error 4: "Array index out of bounds"
[01:01:58] [debug] Accessing element at index 387 past array upper bound 324
[01:01:58] [debug] AMX backtrace:
[01:01:58] [debug] #0 0006b184 in public BustAim_OnPlayerConnect (playerid=387) at C:\Users\x.pwn:6304
[01:01:58] [debug] #1 000446c0 in public FC_OnPlayerConnect (playerid=387) at C:\Users\x\include\antiaimbotZ.inc:655
[01:01:58] [debug] #2 native CallLocalFunction () from samp03svr
[01:01:58] [debug] #3 00040348 in public AB_OnPlayerConnect (playerid=387) at C:\Users\x\include\floodcontrol.inc:68
[01:01:58] [debug] #4 0003d0c4 in public MP_OPC (playerid=387) at C:\Users\x\include\e_airbreak.inc:36
[01:01:58] [debug] #5 native CallLocalFunction () from samp03svr
[01:01:58] [debug] #6 0003589c in ?? (... <1 argument>) at C:\Users\x\include\mSelection.inc:432
[01:01:58] [debug] #7 00022030 in public SSCANF_OnPlayerConnect (playerid=387) at C:\Usersx\include\YSI\y_hooks/impl.inc:618
[01:01:58] [debug] #8 0000de24 in public Itter_OnPlayerConnect (playerid=387) at C:\Users\x\include\sscanf2.inc:236
[01:01:58] [debug] #9 0000b55c in public OnPlayerConnect (playerid=387) at C:\x\include\YSI\y_iterate.inc:646
[01:01:58] [debug] #10 native FCNPC_Create () from FCNPC.so
[01:01:58] [debug] #11 003f96e4 in crearZombie (name[]=@0307c030 "Zombie_11") at C:\Users\x.pwn:65408
[01:01:58] [debug] #12 003f9684 in crearZombies () at C:\Users\x.pwn:65400
[01:01:58] [debug] #13 000c47ec in public zcmd_OnGameModeInit () at C:\Users\x.pwn:11309
[01:01:58] [debug] #14 native CallLocalFunction () from samp03svr
[01:01:58] [debug] #15 00031a90 in public fcnpc1_OnGameModeInit () at C:\x\include\zcmd.inc:68
[01:01:58] [debug] #16 0003188c in public fcnpc0_OnGameModeInit () at C:\x\include\FCNPC.inc:556
[01:01:58] [debug] #17 00031420 in ?? () at C:\Users\x\FCNPC.inc:453
[01:01:58] [debug] #18 00021c50 in public SSCANF_OnGameModeInit () at C:\Users\x\include\YSI\y_hooks/impl.inc:484
[01:01:58] [debug] #19 0000dd30 in public Itter_OnGameModeInit () at C:\Users\x\include\sscanf2.inc:205
[01:01:58] [debug] #20 native CallLocalFunction () from samp03svr
[01:01:58] [debug] #21 0000ba28 in public ScriptInit_OnGameModeInit () at C:\Users\x\include\YSI\y_iterate.inc:791
[01:01:58] [debug] #22 0000aa30 in public OnGameModeInit () at C:\Users\x\include\YSI\internal\..\y_scriptinit.in c:171
[01:01:58] [FCNPC] Error: NPC 'Zombie_11' not created. Name 'Zombie_11' is invalid or the maxnpc limit in server.cfg has been reached.
[01:01:58] [debug] Run time error 4: "Array index out of bounds"
[01:01:58] [debug] Accessing element at index 65535 past array upper bound 398
[01:01:58] [debug] AMX backtrace:
[01:01:58] [debug] #0 003fb970 in crearBarraSalud (npcid=65535) at C:\x.pwn:65690
[01:01:58] [debug] #1 003f9768 in crearZombie (name[]=@0307c030 "Zombie_11") at C:\Users\x.pwn:65412
[01:01:58] [debug] #2 003f9684 in crearZombies () at C:\Users\Bx.pwn:65400
[01:01:58] [debug] #3 000c47ec in public zcmd_OnGameModeInit () at C:\x.pwn:11309
[01:01:58] [debug] #4 native CallLocalFunction () from samp03svr
[01:01:58] [debug] #5 00031a90 in public fcnpc1_OnGameModeInit () at C:\Users\x\include\zcmd.inc:68
[01:01:58] [debug] #6 0003188c in public fcnpc0_OnGameModeInit () at C:\x\include\FCNPC.inc:556
[01:01:58] [debug] #7 00031420 in ?? () at C:\x\include\FCNPC.inc:453
[01:01:58] [debug] #8 00021c50 in public SSCANF_OnGameModeInit () at C:\x\include\YSI\y_hooks/impl.inc:484
[01:01:58] [debug] #9 0000dd30 in public Itter_OnGameModeInit () at C:\Users\x\include\sscanf2.inc:205
[01:01:58] [debug] #10 native CallLocalFunction () from samp03svr
[01:01:58] [debug] #11 0000ba28 in public ScriptInit_OnGameModeInit () at C:\Users\x\include\YSI\y_iterate.inc:791
[01:01:58] [debug] #12 0000aa30 in public OnGameModeInit () at C:\Users\x\include\YSI\internal\..\y_scriptinit.in c:171

I think this part of the code is causing the bug because I can't have 400 players or more (only up to 399)

Код:
if(Iter_Count(Player) > MaxPlayersConnected)
	{
		MaxPlayersConnected = Iter_Count(Player);
		gettime(MPHour,MPMinute);
		getdate(MPYear,MPMonth,MPDay);
	}
	if(MaxPlayersConnected > 400) MaxPlayersConnected = 400; // Temp good fix

	new playername[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playername, sizeof(playername));
	if(!INI_Exist(playername)) // If exists in Y_ini
	{
    	if(doesAccountExist(playername)) // If exists in .ini
    	{
			ConvertAccount(playerid); // Convert Account to y_ini
			return 1;
		}
	}
	SetTimerEx("SafeLogin", 4000, 0, "d", playerid);
 	return 1;}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)