Run Time Error 4
#1

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?
Reply
#2

Post the Lines plx
Reply
#3

I dunno the line since I get this error when running the respective script
Reply
#4

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 =)
Reply
#5

What does it say ?
just "Array index out of bounds" without any Line ?

//Read the last Reply^
Reply
#6

Код:
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
Reply
#7

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.
Reply
#8

Try to comment your last edits and try it again.
It should be some string/cell, but im not rlly sure
Maybe under OnGameModeInit
Reply
#9

I have looked over all the script and I haven't found nothing that might of fix that D:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)