Players crash when they wanna spawn
#1

Crash error; http://pastebin.com/CmXsFXwd

Happends when they try to spawn.
Reply
#2

If all players crash, then it could be a script error, if one player crashes, then it could be probably mods, try to check if there's anything wrong on OnPlayerSpawn callback.
Reply
#3

Show us your OnPlayerSpawn.
Reply
#4

Everyone crashes upon login;

What could cause this crash? If you tell me how it starts, I can find the problem instead of posting here.
Reply
#5

Have you even read my post? If you fully read it, I am sure you would've gave us some info that could help us solving your problem, so, please re-look at my post.
Reply
#6

Код:
public OnPlayerSpawn(playerid)
{
    if(Tutorial[playerid])
    {
        TogglePlayerSpectating(playerid, false);
        SetPlayerHealth(playerid, 100);
        SetPlayerInterior(playerid, 15);
		SetPlayerVirtualWorld(playerid,playerid+50);
        SetPlayerPos(playerid, 217.6533,-98.6531,1005.2578);
        SetCameraBehindPlayer(playerid);
		SetPlayerFacingAngle(playerid, 268.3423);
		TogglePlayerControllable(playerid, false);
    }
    if(CharacterData[playerid][pLoggedIn])
	{
		if (GetPlayerMoney(playerid) != CharacterData[playerid][pCash])
		{
		    GivePlayerMoney(playerid, CharacterData[playerid][pCash]);
		}
		if (GetPlayerScore(playerid) != CharacterData[playerid][pLevel])
		{
		    SetPlayerScore(playerid, CharacterData[playerid][pLevel]);
		}
		if (IsSpecing[playerid])
		{
		    new user = SpectatingID[playerid];
			SetPlayerPos(playerid, CharacterData[playerid][pPosition][0], CharacterData[playerid][pPosition][1], CharacterData[playerid][pPosition][2]);
	  		SetPlayerVirtualWorld(playerid, CharacterData[playerid][pVW]);
	    	SetPlayerInterior(playerid, CharacterData[playerid][pInt]);
	    	SetPlayerFacingAngle(playerid, CharacterData[playerid][pPosition][3]);
	    	SetPlayerSkin(playerid, CharacterData[playerid][pSkin]);
	    	SetPlayerWeapons(playerid);
			IsSpecing[playerid] = 0;
			
			SpectatingID[playerid] = INVALID_PLAYER_ID;
			IsSpecing[playerid] = 0;
			IsBeingSpeced[user] = 0;
			
			return 1;
		}
		if (IsWatchingTV[playerid])
		{
			SetPlayerPos(playerid, CharacterData[playerid][pPosition][0], CharacterData[playerid][pPosition][1], CharacterData[playerid][pPosition][2]);
	  		SetPlayerVirtualWorld(playerid, CharacterData[playerid][pVW]);
	    	SetPlayerInterior(playerid, CharacterData[playerid][pInt]);
	    	SetPlayerFacingAngle(playerid, CharacterData[playerid][pPosition][3]);
	    	SetPlayerSkin(playerid, CharacterData[playerid][pSkin]);
	    	SetPlayerWeapons(playerid);
			IsWatchingTV[playerid] = 0;
			return 1;
		}
		if(CharacterData[playerid][pPrisoned] > 0)
		{
		    SetPlayerColor(playerid, 0xED9111FF);
		    SetPlayerHealth(playerid, 100);
		    CharacterData[playerid][pArmor] = 100;
			SetPlayerArmour(playerid, 100);
			SetPlayerPos(playerid, 264.6288, 77.5742, 1001.0391);
			SetPlayerInterior(playerid, 6);
			SetPlayerVirtualWorld(playerid, playerid+1337);
			SetPlayerSkin(playerid, CharacterData[playerid][pSkin]);
			return 1;
		}
		if (PlayerJustDied[playerid])
		{
			SetPlayerPos(playerid, DeathStuff[playerid][DeathX], DeathStuff[playerid][DeathY], DeathStuff[playerid][DeathZ]);
		    SetPlayerInterior(playerid, DeathStuff[playerid][DeathInt]);
		    SetPlayerFacingAngle(playerid, DeathStuff[playerid][DeathA]);
			SetPlayerSkin(playerid, CharacterData[playerid][pSkin]);
			DeathStuff[playerid][DeathHP] = 100;
		    displayCenterHUDInfo(playerid, "~r~Injured~n~~w~/accept death or /service ems", 5);
		    SetPlayerArmour(playerid, 0.0);
		    SetPlayerHealth(playerid, 100.0);
		    ClearAnimations(playerid);
	        ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die",4.0,0,1,1,1,0,1);
	        for(new i = 0;i<13;i++)
	       	{
	      		GivePlayerValidWeapon(playerid, DeathWeapons[playerid][i][0], DeathWeapons[playerid][i][1]);
	       	}
			SetTimerEx("DeathTimer", 1000, false, "i", playerid);
			return 1;
		}
		if(CharacterData[playerid][pHospitalized])
		{
		    KillTimer(DeathTimer(playerid));
		    TogglePlayerControllable(playerid, 0);
		    SetPlayerArmour(playerid, 0);
		    SetPlayerSkin(playerid, CharacterData[playerid][pSkin]);
			ClearWeapons(playerid);
			SetPlayerVirtualWorld(playerid, 0);
			SetPlayerHospital(playerid);
			return 1;
	    }
	}
	if(!CharacterData[playerid][pLoggedIn])
	{
	    if(CharacterData[playerid][pFacDuty] && CharacterData[playerid][pFaction] > 0)
	        SetPlayerColor(playerid, FactionData[CharacterData[playerid][pFaction]][fac_Color]);
	        
	    SetPlayerSkin(playerid, CharacterData[playerid][pSkin]);
	    SetPlayerHealth(playerid, CharacterData[playerid][pHealth]);
		SetPlayerArmour(playerid, CharacterData[playerid][pArmor]);
		
		SetPlayerVirtualWorld(playerid, CharacterData[playerid][pVW]);
	    SetPlayerInterior(playerid, CharacterData[playerid][pInt]);
		
		mysql_format(MainPipeline, szQuery, sizeof(szQuery), "SELECT * FROM `toys` WHERE `Toy_Owner` = '%d'", CharacterData[playerid][pSQLID]);
		mysql_function_query(MainPipeline, szQuery, true, "LoadPlayerToys", "i", playerid);
	        
		SetPlayerWeapons(playerid);
		PreloadAnimLib(playerid, "BOMBER");
		PreloadAnimLib(playerid, "RAPPING");
		PreloadAnimLib(playerid, "SHOP");
		PreloadAnimLib(playerid, "BEACH");
		PreloadAnimLib(playerid, "SMOKING");
		PreloadAnimLib(playerid, "FOOD");
		PreloadAnimLib(playerid, "ON_LOOKERS");
		PreloadAnimLib(playerid, "DEALER");
		PreloadAnimLib(playerid, "Cocaine");
		PreloadAnimLib(playerid, "CARRY");
		PreloadAnimLib(playerid, "COP_AMBIENT");
		PreloadAnimLib(playerid, "PARK");
		PreloadAnimLib(playerid, "INT_HOUSE");
		PreloadAnimLib(playerid, "FOOD");
		PreloadAnimLib(playerid, "PED");
		PreloadAnimLib(playerid, "BD_FIRE");
		PreloadAnimLib(playerid, "GRAFFITI");
		CharacterData[playerid][pLoggedIn] = true;
		SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
		SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
		SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1);
		SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1);
		SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1);
		
		SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
		SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1);
		SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1);
		SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1);
		SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 1);
		SetPlayerArmedWeapon(playerid, 0);
	}
	return 1;
}
I don't see anything wrong.
Reply
#7

Did you try to debug the code?
Reply
#8

Some X,Y,Z on map may crash the player on spawn, also INVALID SKINS..check if CharacterData[playerid][pSkin] is holding the correct value.
Reply
#9

Quote:
Originally Posted by XO
Посмотреть сообщение
Some X,Y,Z on map may crash the player on spawn, also INVALID SKINS..check if CharacterData[playerid][pSkin] is holding the correct value.
Everything is setted correctly.
Reply
#10

Found something new:

Код:
[18:21:58] Warning(opcode 0x4EE): Exception 0xC0000005 at 0x48C3A9

[18:21:58] Warning(opcode 0x4EE): Exception 0xC0000005 at 0x48C3A9

[18:21:58] Warning(opcode 0x4EE): Exception 0xC0000005 at 0x48C3A9

[18:21:58] Warning(opcode 0x4EE): Exception 0xC0000005 at 0x48C3A9

[18:21:58] Warning(opcode 0x4EE): Exception 0xC0000005 at 0x48C3A9

[18:21:58] Warning(opcode 0x4EE): Exception 0xC0000005 at 0x48C3A9

[18:21:58] Warning(opcode 0x4EE): Exception 0xC0000005 at 0x48C3A9

[18:21:58] Warning(opcode 0x4EE): Exception 0xC0000005 at 0x48C3A9

[18:21:58] Warning(opcode 0x4EE): Exception 0xC0000005 at 0x48C3A9

[18:21:58] Warning(opcode 0x4EE): Exception 0xC0000005 at 0x48C3A9

[18:21:58] Warning(opcode 0x4EE): Exception 0xC0000005 at 0x48C3A9
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)