01.07.2013, 18:40
Hi SA-MP.com, I have small problem in my GM:
Linie 140;
This is all my CALLBACK
What is the problem??
What i missed, i have all in myscriptfiles.. No ERRORS, NO WARNS
pawn Код:
[02:36:36] [debug] Run time error 4: "Array index out of bounds"
[02:36:36] [debug] Accessing element at negative index -1
[02:36:36] [debug] AMX backtrace:
[02:36:36] [debug] #0 00016c00 in INI_Close (INI:file=-1) at C:\Users\Administrator\Desktop\Stunt Field League - Build 1\pawno\include\YSI\y_ini.inc:746
[02:36:36] [debug] #1 0001b4c4 in public S@@_OnPlayerDisconnect (playerid=0, reason=1) at C:\Users\Administrator\Desktop\Stunt Field League - Build 1\gamemodes\SFL.pwn:140
[02:36:36] [debug] #2 0000dbf4 in public Streamer_OnPlayerDisconnect (playerid=0, reason=1) at C:\Users\Administrator\Desktop\Stunt Field League - Build 1\pawno\include\YSI\y_hooks/impl.inc:661
[02:36:36] [debug] #3 native CallLocalFunction () [00471e90] from samp-server.exe
[02:36:36] [debug] #4 00007a98 in Debug_Print0 (... <2 variable arguments>) at C:\Users\Administrator\Desktop\Stunt Field League - Build 1\pawno\include\streamer.inc:361
[02:36:36] [debug] #5 00000354 in Debug_Print0 (... <2 variable arguments>) at C:\Users\Administrator\Desktop\Stunt Field League - Build 1\pawno\include\sscanf2.inc:229
pawn Код:
INI_Close(File);
pawn Код:
OnPlayerDisconnect ( playerid , reason )
{
new string [ 128 ] ;
switch ( reason )
{
case 0: format(string, 128, "{FFFF00}%s {008000}a iesit de pe server {FFFFFF}(Timeout)", P_NAME( playerid )) ;
case 1: format(string, 128, "{FFFF00}%s {008000}a iesit de pe server {FFFFFF}(Leaving)", P_NAME( playerid ));
case 2: format(string, 128, "{FFFF00}%s {008000}a iesit de pe server {FFFFFF}(Kicked/Banned)", P_NAME( playerid ));
}
SCMTA ( COLOR_WHITE , string );
if(playerid != INVALID_PLAYER_ID)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",P_INFO[playerid][Level]);
INI_WriteInt(File,"V.I.P",P_INFO[playerid][Vip]);
INI_WriteInt(File,"Kills",P_INFO[playerid][Kills]);
INI_WriteInt(File,"Deaths",P_INFO[playerid][Deaths]);
INI_Close(File); //here
}
return ( 1 );
}
What i missed, i have all in myscriptfiles.. No ERRORS, NO WARNS