Posts: 25
Threads: 8
Joined: Sep 2014
Reputation:
0
Hello,
i have system robbery on my gamemode with include RNCP but bot don't spawn and on chat log are the errors:
[19:10:59] [debug] Run time error 4: "Array index out of bounds"
[19:10:59] [debug] Accessing element at index 15 past array upper bound 14
[19:10:59] [debug] AMX backtrace:
[19:10:59] [debug] #0 0000b044 in public StartRobNPCs () at F:\KwT REVOLUTION\pawno\include\Rapina.inc:144
[19:10:59] [debug] #1 0000ce88 in public RNPC_OnGameModeInit () at F:\KwT REVOLUTION\pawno\include\Rapina.inc:383
[19:10:59] [debug] #2 native CallLocalFunction () from samp03svr
[19:10:59] [debug] #3 00009ed4 in public SSCANF_OnGameModeInit () at F:\KwT REVOLUTION\pawno\include\rnpc.inc:586
[19:10:59] [debug] #4 000006f8 in public OnGameModeInit () at F:\KwT REVOLUTION\pawno\include\sscanf2.inc:174
Help me please...
Posts: 1,861
Threads: 103
Joined: Sep 2011
Reputation:
0
I never dug deep into crashdetect errors but from what I understand, you try to access the element of an array which is out of bounds (in other words, a non existent element). You can start off by posting your StartRobNPCs function from Rapina.inc (which should be at line 144 I guess)..
Posts: 25
Threads: 8
Joined: Sep 2014
Reputation:
0
I have solved this problem but my NPC is not connected in server. Why? In chatlog not exists..
Posts: 25
Threads: 8
Joined: Sep 2014
Reputation:
0
// Publics
forward StartRobNPCs();
public StartRobNPCs()
{
new i;
for(i = 1; i <= MAX_ROBNPCS; i++)
{
RobNPC[i][rnIsCon] = INVALID_PLAYER_ID;
}
}
In this codice, are the error... what's?
Posts: 25
Threads: 8
Joined: Sep 2014
Reputation:
0
[11:44:56] [debug] Run time error 4: "Array index out of bounds"
[11:44:56] [debug] Accessing element at index 15 past array upper bound 14
[11:44:56] [debug] AMX backtrace:
[11:44:56] [debug] #0 0000b678 in public StartRobNPCs () at F:\KwT REVOLUTION\pawno\include\rnpc2.inc:146
[11:44:56] [debug] #1 0000d4bc in public RNPC_OnGameModeInit () at F:\KwT REVOLUTION\pawno\include\rnpc2.inc:385
[11:44:56] [debug] #2 native CallLocalFunction () from samp03svr
[11:44:56] [debug] #3 0000a508 in public zcmd_OnGameModeInit () at F:\KwT REVOLUTION\pawno\include\rnpc.inc:590
[11:44:56] [debug] #4 native CallLocalFunction () from samp03svr
[11:44:56] [debug] #5 00007054 in public SSCANF_OnGameModeInit () at F:\KwT REVOLUTION\pawno\include\zcmd.inc:68
[11:44:56] [debug] #6 000006f8 in public OnGameModeInit () at F:\KwT REVOLUTION\pawno\include\sscanf2.inc:174
This error in chat log....
In rnpc2.inc error at this
// Publics
forward StartRobNPCs();
public StartRobNPCs()
{
new i;
for(i = 1; i <= MAX_ROBNPCS; i++)
{
RobNPC[i][rnIsCon] = INVALID_PLAYER_ID;
}
return 1;
}
In rnpc2.inc at the error this
public OnGameModeInit()
{
#if defined RN_OnGameModeInit
RN_OnGameModeInit();
#endif
StartRobNPCs();
}
In rnpc.inc at the error this
#if defined _ALS_OnGameModeInit
#undef OnGameModeInit
#else
#define _ALS_OnGameModeInit
#endif
#define OnGameModeInit RNPC_OnGameModeInit
In zcmd.inc at the error:
return CallLocalFunction("zcmd_OnGameModeInit", "");
In sscanf2.inc at the error:
#if defined SSCANF_OnGameModeInit
SSCANF_OnGameModeInit();
#endif
return 1;
}
Help me please.....
Posts: 1,915
Threads: 64
Joined: Jan 2016
Reputation:
0
Your NPC are connected to your server ?
If not, like Jstylezzz said, what is the limite of your maxnpc in server.cfg ?
Posts: 25
Threads: 8
Joined: Sep 2014
Reputation:
0
Yes, my NPC is connected to the game but plugin crashdetect do this error..