SA-MP Forums Archive
HOW TO FIX THIS 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: HOW TO FIX THIS PROBLEM (/showthread.php?tid=623783)



HOW TO FIX THIS PROBLEM - KNIGHT786 - 05.12.2016

[05:43:07] [debug] Run time error 4: "Array index out of bounds"
[05:43:07] [debug] Attempted to read/write array element at index 500 in array of size 500
[05:43:07] [debug] AMX backtrace:
[05:43:07] [debug] #0 0010ac90 in public Load_Vehicles () from CnR1.amx
[05:43:07] [debug] #1 00157140 in public FIXES_OnGameModeInit () from CnR1.amx
[05:43:07] [debug] #2 000122a0 in public FC_OnGameModeInit () from CnR1.amx
[05:43:07] [debug] #3 native CallLocalFunction () from sampsvr-port_2509
[05:43:07] [debug] #4 00010870 in public SSCANF_OnGameModeInit () from CnR1.amx
[05:43:07] [debug] #5 00004688 in public zcmd_OnGameModeInit () from CnR1.amx
[05:43:07] [debug] #6 native CallLocalFunction () from sampsvr-port_2509
[05:43:07] [debug] #7 00004144 in public Itter_OnGameModeInit () from CnR1.amx
[05:43:07] [debug] #8 native CallLocalFunction () from sampsvr-port_2509
[05:43:07] [debug] #9 00001958 in public ScriptInit_OnGameModeInit () from CnR1.amx
[05:43:07] [debug] #10 0000090c in public OnGameModeInit () from CnR1.amx
[05:43:07] can anyone help me how to fix these


Re: HOW TO FIX THIS PROBLEM - Micko123 - 05.12.2016

Copy your public Load_Veicles() here


Re: HOW TO FIX THIS PROBLEM - doreto - 05.12.2016

Did you really have to 3 threads ? Creating more than one will not get you help any faster. Anyway in your Load_Vehicles function increase your array size by 1.


Re: HOW TO FIX THIS PROBLEM - KNIGHT786 - 05.12.2016

sorry for 3 threads but i dont understand what are you mean by Load_Vehicles function increase your array size by 1 can u clearly define this


Re: HOW TO FIX THIS PROBLEM - vikoo - 05.12.2016

ur server is crashing ?


Re: HOW TO FIX THIS PROBLEM - KNIGHT786 - 05.12.2016

no but i cant change class also server weather change and a logo of gta san show in center of screen for 5 to 10mins


Re: HOW TO FIX THIS PROBLEM - Micko123 - 05.12.2016

everything that is under
PHP код:
public Load_Vehicles() 
Copy here from your gamemode


Re: HOW TO FIX THIS PROBLEM - iLearner - 05.12.2016

fk another one of czcnr


Re: HOW TO FIX THIS PROBLEM - KNIGHT786 - 05.12.2016

ok bro w8 for a sec . lol there is nothing here its just

// Vehicles
//load_oVehicles();
Load_Vehicles();

// Zones
load_zones();

// Flush gangs
flushGangs();

// Flush explosives
flushExplosiveData();

// Set server weather
SetWeather(4);


SetTimer("GateCheck", 800, true);

//Create gate's
for(new i=0, all=sizeof(gates); i<all; i++)
{
gates[i][ag_id] = CreateObject(980, gates[i][ag_closePos][0], gates[i][ag_closePos][1], gates[i][ag_closePos][2], gates[i][ag_closePos][3], gates[i][ag_closePos][4], gates[i][ag_closePos][5]);
}


// Timers
SetTimer("countMuteTime", 1000, true);
SetTimer("countRobTime", 1000, true);
SetTimer("highPing", 2000, true);
SetTimer("armourCheck", 5000, true); // also caters for DM arena checks
SetTimer("checkJetpack", 2000, true);
SetTimer("gameTip", 600000, true);
SetTimer("quotes", 900000, true);
SetTimer("vipCheck", 300000, true);
SetTimer("Zones_Update", 1000, true);
SetTimer("classCheck", 10000, true);
SetTimer("autoMoneyBag", 1200000, true);
SetTimer("swapMOTD", 300000, true);

for(new i = 0; i < MAX_PLAYERS; i++)
{
Zones[i] = TextDrawCreate(86.000000, 320.000000, "_");
TextDrawBackgroundColor(Zones[i], 255);
TextDrawFont(Zones[i], 1);
TextDrawLetterSize(Zones[i], 0.300000, 1.200000);
TextDrawColor(Zones[i], -1);
TextDrawSetOutline(Zones[i], 0);
TextDrawSetProportional(Zones[i], 1);
TextDrawSetShadow(Zones[i], 1);
TextDrawUseBox(Zones[i], 0);
TextDrawAlignment(Zones[i], 2);
}
if u need more lines og gamemode tell me i send u
but help me plzz


Re: HOW TO FIX THIS PROBLEM - AlexBlack - 05.12.2016

He told you copy "Load_Vehicles" not OnGameModeInit