[22:22:53]+ [debug] Run time error 4: "Array index out of bounds" [22:22:53]+ [debug] Accessing element at negative index -1 [22:22:53]+ [debug] AMX backtrace: [22:22:53]+ [debug] #0 000163b8 in INI_Close (INI:file=-1) at C:\Users\MaHdy\Desktop\SPA Server original\pawno\include\YSI\y_ini.inc:746 [22:22:53]+ [debug] #1 0002127c in public Itter_OnPlayerDisconnect (playerid=6, reason=1) at C:\Users\MaHdy\Desktop\SPA Server original\filterscripts\GarHouse.pwn:564 [22:22:53]+ [debug] #2 0001b8ec in public Streamer_OnPlayerDisconnect (playerid=6, reason=1) at C:\Users\MaHdy\Desktop\SPA Server original\pawno\include\YSI\y_iterate.inc:909 [22:22:53]+ [debug] #3 native CallLocalFunction () [080d2bb0] from samp03svr [22:22:53]+ [debug] #4 0001a708 in ?? (... <2 arguments>) at C:\Users\MaHdy\Desktop\SPA Server original\pawno\include\streamer.inc:361 [22:22:53]+ [debug] #5 0000cbac in public SSCANF_OnPlayerDisconnect (playerid=6, reason=1) at C:\Users\MaHdy\Desktop\SPA Server original\pawno\include\YSI\y_hooks/impl.inc:661 [22:22:53]+ [debug] #6 00000528 in public OnPlayerDisconnect (playerid=6, reason=1) at C:\Users\MaHdy\Desktop\SPA Server original\pawno\include\sscanf2.inc:229
public OnPlayerDisconnect(playerid, reason) { new year, month, day, lastvisited[20], lasthcp = GetPVarInt(playerid, "LastHouseCP"); EndHouseRobbery(playerid); if(!strcmp(hInfo[lasthcp][HouseOwner], pNick(playerid), CASE_SENSETIVE) && IsInHouse{playerid} == 1 && fexist(HouseFile(lasthcp))) { getdate(year, month, day); format(lastvisited, sizeof(lastvisited), "%02d/%02d/%d", day, month, year); new INI:file = INI_Open(HouseFile(lasthcp)); INI_WriteInt(file, "QuitInHouse", 1); INI_WriteString(file, "LastVisited", lastvisited); INI_Close(file); #if GH_HOUSECARS == true SaveHouseCar(lasthcp); UnloadHouseCar(lasthcp); #endif } IsInHouse{playerid} = 0; return 1; }
In GarHouse.pwn at line 564, something is accessing array at index -1. Show us lines 540-580
|
hInfo[lasthcp][HouseOwner]
Exactly which line is 564 now?
@OP: Well, you don't respond, but one of probable causes would be here pawn Код:
|
SaveHouseCar(lasthcp);
Well, that's a function call, and that means the reason lies within it's code.
|
#define GH_HOUSECARS
For me it looks like GH_HOUSECARS indicates some bigger component. Somewhere near top of your script there should be
pawn Код:
|