Run Time Error 4 - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Run Time Error 4 (
/showthread.php?tid=89637)
Run Time Error 4 -
MPKaboose - 03.08.2009
Run time error 4: "Array index out of bounds" I know what it mean but there is nothing like that in the script what can I do to fix it?
Re: Run Time Error 4 -
Jason_Gregory - 03.08.2009
Post the Lines plx
Re: Run Time Error 4 -
MPKaboose - 03.08.2009
I dunno the line since I get this error when running the respective script
Re: Run Time Error 4 -
Joe Staff - 03.08.2009
The error that it gives you tells you what line it's on. You scroll down to that line and copy it, the one above it, and the one below it, then paste it in the reply box =)
Re: Run Time Error 4 -
Jason_Gregory - 03.08.2009
What does it say ?
just "Array index out of bounds" without any Line ?
//Read the last Reply^
Re: Run Time Error 4 -
MPKaboose - 03.08.2009
Код:
SA:MP Dedicated Server
----------------------
v0.2X, ©2005-2008 SA:MP Team
[15:47:01]
[15:47:01] Server Plugins
[15:47:01] --------------
[15:47:01] Loaded 0 plugins.
[15:47:01]
[15:47:01] Filter Scripts
[15:47:01] ---------------
[15:47:01] Loaded 0 filter scripts.
[15:47:01]
[15:47:01] Nord City RolePlay 4.0.0 June 30
[15:47:01] Copyright © Mate Peter & Torok Laszlo 2007-2009
[15:47:01] http://NordCityRolePlay.co.cc
[15:47:01]
[15:47:01] MySQL Disabled
[15:47:01] Streamer Disabled
[15:47:01] Audio Disabled
[15:47:01] Script[gamemodes/ncrp.amx]: Run time error 4: "Array index out of bounds"
[15:47:03] --- Server Shutting Down.
[15:47:03]
There is no line
Re: Run Time Error 4 -
Joe Staff - 03.08.2009
Oh, You must have done something like this.
pawn Код:
new IndexArray[MAX_PLAYERS];
OnGameModeInit()
{
for(new i; i<=MAX_PLAYERS;i++)
{
...something using IndexArray[i]...
}
}
Although I can't say that's what happend, I know that you have made an array like new variable[array]; and then you made it read/write it at a cell that doesn't exist.
Re: Run Time Error 4 -
Jason_Gregory - 03.08.2009
Try to comment your last edits and try it again.
It should be some string/cell, but im not rlly sure
Maybe under OnGameModeInit
Re: Run Time Error 4 -
MPKaboose - 03.08.2009
I have looked over all the script and I haven't found nothing that might of fix that D: