Crashdetect problem when Logging out
#1

Hello,

I found that when i disconnect from my server and its show crashdetect problem that I can't fix so I come here to ask you for help.

My problem

Код:
[11:12:06] [debug] Run time error 6: "Invalid instruction"
[11:12:06] [debug]  Unknown opcode 0x3b246b4 at address 0x00000030
[11:12:06] [debug] AMX backtrace:
[11:12:06] [debug] #0 00000030 in public SSCANF_OnPlayerDisconnect () at <unknown file>:0
[11:12:06] [debug] #1 native CallLocalFunction () from samp-server.exe
[11:12:06] [debug] #2 00013b4c in public Streamer_OnPlayerDisconnect (playerid=0, reason=1) at C:\Desktop\Drift GM\pawno\include\sscanf2.inc:143
[11:12:06] [debug] #3 00013298 in ?? (... <2 arguments>) at C:\Desktop\Drift GM\pawno\include\streamer.inc:325
[11:12:06] [debug] #4 00006388 in public OnPlayerDisconnect (playerid=0, reason=1) at C:\Desktop\Drift GM\pawno\include\YSI\y_hooks/impl.inc:661
[11:12:06] [part] FeRRum[Scripter] has left the server (0:1)
Reply
#2

Try to update the includes that showing from the error..

p/s: Just give a try maybe? Because i never seen this problem before..
Reply
#3

Show your OnPlayerDisconnect, this usually happens when you pass wrong arguments.

Код:
// FUNCTION
OnPlayerTest(playerid, test1, test2, tesing[])

// YOUR CALL
CallLocalFunction("OnPlayerTest", "iii", 1, 2, 3); //YOU FORGOT THE LAST ARGUMENT

//ALSO BY DIRECT CALLS
Reply
#4

PHP код:
public OnPlayerDisconnect(playeridreason)
{
    new 
sz_String[128];
    
    switch(
reason)
    {
        case 
0format(sz_Stringsizeof(sz_String), "%s[ID:%d] {FF0000}загуби връзка. {ffffff}(Crash)",PlayerName(playerid),playerid);
        case 
1format(sz_Stringsizeof(sz_String), "%s[ID:%d] {FF0000}излезе от сървъра. {ffffff}(Leave)",PlayerName(playerid),playerid);
        case 
2format(sz_Stringsizeof(sz_String), "%s[ID:%d] {FF0000}беше кикнат от сървъра. {ffffff}(Kick)",PlayerName(playerid),playerid);
    }
    
SendClientMessageToAll(-1sz_String);
    
    if(
CreatedRamp[playerid] == trueDestroyObject(Ramp[playerid]), CreatedRamp[playerid] = false;
    
CreatedRamp[playerid] = false;
    
RampEnabled[playerid] = 0;
    
Pers[playerid] = 0;
    
    new 
INI:playerFile INI_Open(UserPath(playerid));
    
INI_SetTag(playerFile,"PData");
    
INI_WriteInt(playerFile"Admin"PlayerInfo[playerid][pAdmin]);
    
INI_WriteInt(playerFile"Deaths"PlayerInfo[playerid][pDeaths]);
    
INI_WriteInt(playerFile"Cash"GetPlayerCash(playerid));
    
INI_WriteInt(playerFile"Kills"PlayerInfo[playerid][pKills]);
    
INI_WriteInt(playerFile"VIP"PlayerInfo[playerid][pVIP]);
    
INI_WriteInt(playerFile"VIPExpire"PlayerInfo[playerid][pVIPExpire]);
    
INI_WriteInt(playerFile"Muted"PlayerInfo[playerid][pMuted]);
    
INI_WriteInt(playerFile"TruckerSkills"PlayerInfo[playerid][pTruckerSkills]);
    
INI_WriteInt(playerFile"Level"GetPlayerScore(playerid));
    
INI_WriteInt(playerFile"Exp"PlayerInfo[playerid][pExp]);
    
INI_WriteInt(playerFile"Job"PlayerInfo[playerid][pJob]);
    
INI_WriteInt(playerFile"Jailed"PlayerInfo[playerid][pJailed]);
    
INI_WriteInt(playerFile"JailTime"PlayerInfo[playerid][pJailTime]);
    
INI_WriteInt(playerFile"Warns"PlayerInfo[playerid][pWarns]);
    
INI_WriteInt(playerFile"HouseKey"PlayerInfo[playerid][pHouseKey]);
    
INI_WriteInt(playerFile"Leader"PlayerInfo[playerid][pLeader]);
    
INI_WriteInt(playerFile"Member"PlayerInfo[playerid][pMember]);
    
INI_WriteInt(playerFile"Rank"PlayerInfo[playerid][pRank]);
    
INI_WriteInt(playerFile"SavedSkin"PlayerInfo[playerid][pSavedSkin]);
    
INI_WriteInt(playerFile"UseSkin"PlayerInfo[playerid][pUseSkin]);
    
INI_Close(playerFile);
    
TextDrawHideForPlayer(playerid,ServerTextDrawOne);
    
TextDrawHideForPlayer(playerid,ServerTextDrawTwo);
    
TextDrawHideForPlayer(playerid,ServerTextDrawThree);
      
TextDrawHideForPlayer(playerid,ServerTextDrawFour[playerid]);
      
TextDrawHideForPlayer(playerid,ServerTextDrawFive[playerid]);
      
TextDrawHideForPlayer(playerid,ServerTextDrawSix[playerid]);
       
TextDrawSetString(ServerTextDrawFour[playerid]," ");
       
TextDrawSetString(ServerTextDrawFive[playerid]," ");
       
TextDrawSetString(ServerTextDrawSix[playerid]," ");
       
      
TextDrawHideForPlayer(playerid,LevelTXD[playerid]);
      
TextDrawHideForPlayer(playerid,ExpTXD[playerid]);
       
    
DriftMoney[playerid] = 0;
    
DriftScore[playerid] = 0;
    
DriftPoints[playerid] = 1;
    
PlayerPositionX[playerid] = 0.0;
    
PlayerPositionY[playerid] = 0.0;
    
PlayerPositionZ[playerid] = 0.0;
    
Laser[playerid] = 0;
    
InDM[playerid] = 0;
    
NoGoto[playerid] = 0;
    
NoPM[playerid] = 0;
    
LastPM[playerid] = -1;
    
GodMode[playerid] = 0;
    
NameTag[playerid] = 0;
    
RampEnabled[playerid] = 0;
    
Pers[playerid] = 0;
    
IsAFK[playerid] = 0;
    
CP[playerid] = 0;
    
RemovePlayerAttachedObject(playerid0);
    
KillTimer(PlayerTimerOne[playerid]);
    
    if(
PlayerInfo[playerid][pMuted] >= 1)
    {
        new 
string[128];
        
format(stringsizeof(string), "AdmWarn: %s напусна сървъра с оставащо време от това, че беше заглушен %d минути."PlayerName(playerid), PlayerInfo[playerid][pMuted]);
        foreach(new 
Player)
        {
            if (
IsPlayerConnected(i))
            {
                
AdminMessage(COLOR_ADMCMDstring);
            }
        }
    }
    
    
HideSpawnTextdraws(playerid);
    
HideAFKTextdraws(playerid);
    return 
1;

Reply


Forum Jump:


Users browsing this thread: