run time error 4
#1

The nativechecker gives me this error in server_log.txt
What can I do to fix it?
PHP код:
[14:31:02] [debugRun time error 4"Array index out of bounds"
[14:31:02] [debug]  Accessing element at index 9 past array upper bound 8
[14:31:02] [debugAMX backtrace:
[
14:31:02] [debug#0 0028b788 in ?? (1) from gm.amx
[14:31:02] [debug#1 00064754 in ?? (1) from gm.amx
[14:31:02] [debug#2 00017eb8 in public OnVehicleSpawn (1) from gm.amx
[14:31:02] [debug#3 native SetVehicleToRespawn () from samp-server.exe
[14:31:02] [debug#4 00057750 in ?? () from gm.amx
[14:31:02] [debug#5 000175c0 in public RL_OnGameModeInit () from gm.amx
[14:31:02] [debug#6 native CallLocalFunction () from samp-server.exe
[14:31:02] [debug#7 0000ad6c in public zcmd_OnGameModeInit () from gm.amx
[14:31:02] [debug#8 native CallLocalFunction () from samp-server.exe
[14:31:02] [debug#9 00009250 in public SSCANF_OnGameModeInit () from gm.amx
[14:31:02] [debug#10 000035b8 in public Itter_OnGameModeInit () from gm.amx
[14:31:02] [debug#11 native CallLocalFunction () from samp-server.exe
[14:31:02] [debug#12 00002874 in public ScriptInit_OnGameModeInit () from gm.amx
[14:31:02] [debug#13 000017f8 in public OnGameModeInit () from gm.amx 
OnVehicleSpawn code
PHP код:
public OnVehicleSpawn(vehicleid)
{
    
//new vehplatestr[128];
    //format(vehplatestr, sizeof vehplatestr, "T:RP %i", vehicleid);
    //SetVehicleNumberPlate(vehicleid, vehplatestr);
    
if(vehicleid != 509 && vehicleid != 481 && vehicleid != 510)
    {
        
SetVehicleParamsEx(vehicleid0000000);
        foreach(
Playeri)
        {
            if(
vehicleid == PlayerInfo[i][pVeh])
            {
                if(
PlayerInfo[i][vLocked]) SetVehicleParamsEx(vehicleid0001000);
                
ChangeVehiclePaintjob(PlayerInfo[i][pVeh], PlayerInfo[i][vPJ]);
                for(new 
x=0x<14i++)
                {
                    
AddVehicleComponent(PlayerInfo[i][pVeh], PlayerInfo[i][pVehMod][x]);
                }
            }
            if(
vehicleid == PlayerInfo[i][pVVeh])
            {
                if(
PlayerInfo[i][vVLocked]) SetVehicleParamsEx(vehicleid0001000);
                
ChangeVehiclePaintjob(PlayerInfo[i][pVVeh], PlayerInfo[i][vVPJ]);
                for(new 
x=0x<14i++)
                {
                    
AddVehicleComponent(PlayerInfo[i][pVVeh], PlayerInfo[i][pVVehMod][x]);
                }
            }
            if(
vehicleid == PlayerInfo[i][pBVeh])
            {
                if(
PlayerInfo[i][vBLocked]) SetVehicleParamsEx(vehicleid0001000);
                
ChangeVehiclePaintjob(PlayerInfo[i][pBVeh], PlayerInfo[i][vBPJ]);
                for(new 
x=0x<14i++)
                {
                    
AddVehicleComponent(PlayerInfo[i][pBVeh], PlayerInfo[i][pBVehMod][x]);
                }
            }
        }
        if(
IsTruckerVehicle(vehicleid))
        {
            
TruckPackages[vehicleid] = -1;
        }
        if(
Siren[vehicleid])
        {
            
Siren[vehicleid] = 0;
            
DestroyDynamicObject(SirenObject[vehicleid]);
            
DestroyDynamicObject(LightObject1[vehicleid]);
        }
    }
    return 
1;

public RL_OnGameModeInit code
PHP код:
public OnGameModeInit()
{
    
RL_OPUP = (funcidx("RL_OnPlayerUpdate") != -1);
    
RL_OPSC = (funcidx("RL_OnPlayerStateChange") != -1);
    
RL_OPKSC = (funcidx("RL_OnPlayerKeyStateChange") != -1);
    
RL_OPC = (funcidx("RL_OnPlayerConnect") != -1);
    return (
funcidx("RL_OnGameModeInit") != -1)?CallLocalFunction("RL_OnGameModeInit",""):1;
}
#if defined _ALS_OnGameModeInit
    #undef OnGameModeInit
#else
    #define _ALS_OnGameModeInit
#endif
#define OnGameModeInit RL_OnGameModeInit
forward RL_OnGameModeInit(); 
zcmd_OnGameModeInit code
PHP код:
public OnGameModeInit()
{
    
zcmd_g_HasOPCS funcidx("OnPlayerCommandReceived") != -1;
    
zcmd_g_HasOPCE funcidx("OnPlayerCommandPerformed") != -1;
    if (
funcidx("zcmd_OnGameModeInit") != -1)
    {
        return 
CallLocalFunction("zcmd_OnGameModeInit""");
    }
    return 
1;
}
#if defined _ALS_OnGameModeInit
    #undef OnGameModeInit
#else
    #define _ALS_OnGameModeInit
#endif
#define OnGameModeInit zcmd_OnGameModeInit
forward zcmd_OnGameModeInit(); 
Reply


Messages In This Thread
run time error 4 - by radiobizza - 16.03.2016, 12:40
Re: run time error 4 - by Virtual1ty - 16.03.2016, 12:51
Re: run time error 4 - by radiobizza - 16.03.2016, 13:05
Re: run time error 4 - by radiobizza - 16.03.2016, 13:14
Re: run time error 4 - by radiobizza - 16.03.2016, 15:30
Re: run time error 4 - by Konstantinos - 16.03.2016, 17:05
Re: run time error 4 - by radiobizza - 16.03.2016, 20:30
Re: run time error 4 - by Konstantinos - 16.03.2016, 20:46
Re: run time error 4 - by radiobizza - 16.03.2016, 21:26
Re: run time error 4 - by Konstantinos - 16.03.2016, 21:30

Forum Jump:


Users browsing this thread: 1 Guest(s)