[00:54:55] [debug] Run time error 4: "Array index out of bounds" [00:54:55] [debug] Accessing element at index 1001 past array upper bound 1000 [00:54:55] [debug] AMX backtrace: [00:54:55] [debug] #0 0037900c in public Spam_OnPlayerKeyStateChange (playerid=0, newkeys=16, oldkeys=0) at D:\Users\Fikus\Desktop\SAMP Test\gamemodes\grpv1.pwn:34577 [00:54:55] [debug] #1 native CallRemoteFunction () from samp-server.exe [00:54:55] [debug] #2 00026f28 in ?? (... <3 arguments>) at D:\Users\Fikus\Desktop\SAMP Test\pawno\include\nospam.inc:278 [00:54:55] [debug] #3 0001280c in public OnPlayerKeyStateChange (playerid=0, newkeys=16, oldkeys=0) at D:\Users\Fikus\Desktop\SAMP Test\pawno\include\YSI\y_hooks/impl.inc:1962 ->>>>>>> [chat] [Fikus]: ^^^^^^^^^^^^^ PRESSED F TO EXIT INTERIOR ^^^^^^^^^^^^ [00:55:01] [debug] Run time error 4: "Array index out of bounds" [00:55:01] [debug] Accessing element at index 1001 past array upper bound 1000 [00:55:01] [debug] AMX backtrace: [00:55:01] [debug] #0 0037900c in public Spam_OnPlayerKeyStateChange (playerid=0, newkeys=16, oldkeys=0) at D:\Users\Fikus\Desktop\SAMP Test\gamemodes\grpv1.pwn:34577 [00:55:01] [debug] #1 native CallRemoteFunction () from samp-server.exe [00:55:01] [debug] #2 00026f28 in ?? (... <3 arguments>) at D:\Users\Fikus\Desktop\SAMP Test\pawno\include\nospam.inc:278 [00:55:01] [debug] #3 0001280c in public OnPlayerKeyStateChange (playerid=0, newkeys=16, oldkeys=0) at D:\Users\Fikus\Desktop\SAMP Test\pawno\include\YSI\y_hooks/impl.inc:1962 ---->>>>> [chat] [Fikus]: ENTERED INTERIOR ^^^^^^^^^^^^^
if(!IsPlayerInAnyVehicle(playerid))
{
for(new i; i < MAX_HOUSE; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ])) <------
{
if(PlayerInfo[playerid][pPosedovanjeKuce] == i || PI[playerid][pRent] == i || KucaInfo[i][kZatvoreno] == 0)
{
SetPlayerVirtualWorld(playerid, KucaInfo[i][kVW]);
SetPlayerInterior(playerid, KucaInfo[i][kInt]);
Dimi_SetPlayerPos(playerid, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]);
PlayerInfo[playerid][pInt] = 1;
SetPlayerWeather(playerid, 1);
PlayerTimer[playerid][25] =SetTimerEx("unfreezeobject",0,false,"d",playerid);
TogglePlayerControllable(playerid, 0);
if(Snegic == 1)
{
DeleteSnow(playerid);
}
antiCheatCS[ playerid ][ TeleportCheck ] = 4;
{
if(KucaInfo[i][kNeaktivnost] >=1)
if(PlayerInfo[playerid][pPosedovanjeKuce] == i)
{
KucaInfo[i][kNeaktivnost] = 0;
SacuvajKucu(i);
SCM(playerid,-1,"Restartovali ste neaktvinost vase kuce !");
KuceLP(i);
}
}
}
else
{
GMT(playerid,"~r~ZAKLJUCANO",4000,1);
return 1;
}
}
|
I'd be a bit wary of this... Whilst removing the include has stopped the error being shown, I'm sure this will come up again.
That OnPlayerKeystateChange is SOOOOOOOOO overweighted. Like, that really needs work, indentation is one thing, but that code, is likely to need a severe look at, it looks like it's simply every gamemode scripts OnPlayerKeystateChange merged into one. |
uncrustify.exe -c ./cfg/defaults.cfg -f opksc.txt > unfopksc.txt