SA-MP Forums Archive
Pawno Compiler Crash - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Pawno Compiler Crash (/showthread.php?tid=370473)



Pawno Compiler Crash - Ben_Hatfield - 20.08.2012

i added these lines to my script

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
ApplyAnimation(playerid,"MEDIC","CPR",1.1,1,0,0,1,30000,1);//Modify it as you want, this is an animation,
 return 1;

    playerDeath[playerid] = 1; // This is saying that the player died.
    return 1;
}
public OnPlayerSpawn(playerid)
{
    if(playerDeath[playerid] == 1) // This is checking if the player had died previously
    {
        SetPlayerPos(playerid,  2034.1534,-1402.6010,17.2946); // Replace X, Y, and Z With the Hospital Co-ords.
        playerDeath[playerid] = 0; // This is saying the player is not dead.
        return 1;
    }
    return 1;
}
and now my pawno crashes when i try to compile.... what did i do wrong


Re: Pawno Compiler Crash - Avi57 - 20.08.2012

errors ?


Re: Pawno Compiler Crash - Ben_Hatfield - 20.08.2012

Quote:
Originally Posted by Avi57
Посмотреть сообщение
errors ?
no errors, my pawno compiler crashes


Re: Pawno Compiler Crash - Amora187 - 20.08.2012

Yes i see the error, try to fix it like this:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
     ApplyAnimation(playerid,"MEDIC","CPR",1.1,1,0,0,1,30000,1);//Modify it as you want, this is an animation,

     playerDeath[playerid] = 1; // This is saying that the player died.  
     return 1;
}
public OnPlayerSpawn(playerid)
{    
     if(playerDeath[playerid] == 1) // This is checking if the player had died previously    
     {        

          SetPlayerPos(playerid,  2034.1534,-1402.6010,17.2946); // Replace X, Y, and Z With the Hospital Co-ords.      

          playerDeath[playerid] = 0; // This is saying the player is not dead.
     }    

     return 1;
}



Re: Pawno Compiler Crash - Shetch - 20.08.2012

Remove the ApplyAnimation line and try to compile it then...

I think it is impossible to apply an animation when someone has died.


Re: Pawno Compiler Crash - Ben_Hatfield - 20.08.2012

Quote:
Originally Posted by Shetch
Посмотреть сообщение
Remove the ApplyAnimation line and try to compile it then...

I think it is impossible to apply an animation when someone has died.
still crashes anyway when i delete it


Re: Pawno Compiler Crash - Amora187 - 20.08.2012

Well, as i said try to compile mines cuz i fixed some errors.


Re: Pawno Compiler Crash - Ben_Hatfield - 20.08.2012

Quote:
Originally Posted by Amora187
Посмотреть сообщение
Well, as i said try to compile mines cuz i fixed some errors.
i did, i still crash when i put it in