#1

Quote:

[20:16:28] [debug] Run time error 4: "Array index out of bounds"
[20:16:28] [debug] Accessing element at index 15 past array upper bound 14
[20:16:28] [debug] AMX backtrace:
[20:16:28] [debug] #0 000d3c3c in ?? () from Badlands.amx
[20:16:28] [debug] #1 00101ef4 in public SSCANF_OnGameModeInit () from Badlands.amx
[20:16:28] [debug] #2 native CallLocalFunction () [00472ad0] from samp-server.exe
[20:16:28] [debug] #3 0000ff9c in public zcmd_OnGameModeInit () from Badlands.amx
[20:16:28] [debug] #4 native CallLocalFunction () [00472ad0] from samp-server.exe
[20:16:28] [debug] #5 0000f8fc in ?? () from Badlands.amx
[20:16:28] [debug] #6 000090ac in public Itter_OnGameModeInit () from Badlands.amx
[20:16:28] [debug] #7 native CallLocalFunction () [00472ad0] from samp-server.exe
[20:16:28] [debug] #8 000026d4 in ?? () from Badlands.amx
[20:16:28] [debug] #9 000015a4 in public OnGameModeInit () from Badlands.amx

??
Reply
#2

Show your OnGameModeInit code.
Reply
#3

Код:
public OnGameModeInit()
{
	// Default Rates
    SendRconCommand("onfoot_rate 50");
	SendRconCommand("incar_rate 50");
	SendRconCommand("weapon_rate 50");
	SendRconCommand("stream_distance 200.0");
	SendRconCommand("stream_rate 2000");
	Streamer_TickRate(100);

	// Security check
	SetTimer("LoginTimeCheck", 1000, 1);

    new a[][] =
    {
        "Unarmed (Fist)",
        "Brass K"
    };
    #pragma unused a


	// Initialise Dispatch System
	for(new v=0; v<MAX_DP_CARS; v++)
	{
		DPCar[v][dpCarID] = 0;
		format(DPCar[v][dpFaction], 10, "None");
		format(DPCar[v][dpModel], 24, "None");
		DPCar[v][dpOfficerID] = -1;
	}

	for(new s=0; s<MAX_DP_SITS; s++)
	{
		DPSituation[s][dpStatus] = 0;
		format(DPSituation[s][dpLoc], 50, "None");
		format(DPSituation[s][dpDesc], 50, "None");
		DPSituation[s][dpCar1] = -1;
		DPSituation[s][dpCar2] = -1;
		DPSituation[s][dpCar3] = -1;
		DPSituation[s][dpCar4] = -1;
	}

	no20 = 0;

	// Fire system Initialization
	RandomLAFireTimer();
	RandomCCFireTimer();
	for(new i=0; i<MAX_FIRES; i++)
	{
	    Fire[i][Fire_Exists] = 0;
		Fire[i][Fire_Taken] = 0;
		Fire[i][Fire_Zone] = MAX_ZONE_NAME;
		Fire[i][Fire_id] = 0;
		Fire[i][Fire_X] = 0.0;
		Fire[i][Fire_Y] = 0.0;
		Fire[i][Fire_Z] = 0.0;
		FireHealth[i] = 0;
	}
	for(new i; i < MAX_PLAYERS; i++)
	{
	    PlayerFireTimer[i][2] = -1;
	}
	// Sockets
		new listenPort = 58000;
		g_Socket = socket_create(TCP);
		if(is_socket_valid(g_Socket)) {
			socket_set_max_connections(g_Socket, 10);
			socket_listen(g_Socket, listenPort); // we are going to listen on port listenPort
		}
		printf("Listen server running on port %d", listenPort);
	}
	return 1;
}
There it is
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)