Problem with include RNPC
#1

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

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)..
Reply
#3

I have solved this problem but my NPC is not connected in server. Why? In chatlog not exists..
Reply
#4

Maybe a stupid question, but have you changed the maxnpc value in your server.cfg? As I recall it's set to 0 by default. If you didn't change it, have a look for 'maxnpc'. If it doesn't exist, just add the maxnpc line, followed by the amount of maximum NPC's to your server.cfg. If this is set, NPC's should connect.

For example
Код:
maxnpc 4
Reply
#5

// 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?
Reply
#6

where is return??
Reply
#7

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

Any solution? ...
Reply
#9

Your NPC are connected to your server ?
If not, like Jstylezzz said, what is the limite of your maxnpc in server.cfg ?
Reply
#10

Yes, my NPC is connected to the game but plugin crashdetect do this error..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)