SA-MP Forums Archive
Error 036 - How to solve? - 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: Error 036 - How to solve? (/showthread.php?tid=290908)



Error 036 - How to solve? - Supercop - 17.10.2011

I am getting a Error 036 (empty statement) on this piece of the script:

Код:
       else if (strcmp(cmdtext, "/relax", true)==0)
        {
        	if(GetPVarInt(playerid, "Injured") != 0||PlayerCuffed[playerid]!=0||GetPVarInt(playerid, "Hospital")!=0);
			{
				SendClientMessage (playerid, COLOR_GRAD2, "You cannot do this at this time.");
			}
            {
            ApplyAnimation(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
			GameTextForPlayer( playerid, "~w~To stop the animation, ~n~type ~r~/stopanim ~w~!", 5000, 3 );
                }
            return 1;
        }



Re: Error 036 - How to solve? - SmiT - 17.10.2011

pawn Код:
else if (strcmp(cmdtext, "/relax", true)==0)
    {
        if(GetPVarInt(playerid, "Injured") != 0 || PlayerCuffed[ playerid ] != 0 || GetPVarInt(playerid, "Hospital") != 0 );
        {
                SendClientMessage (playerid, COLOR_GRAD2, "You cannot do this at this time.");
        }
        else // <----------
        {
            ApplyAnimation(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
            GameTextForPlayer( playerid, "~w~To stop the animation, ~n~type ~r~/stopanim ~w~!", 5000, 3 );
        }
        return 1;
    }



Re: Error 036 - How to solve? - Supercop - 17.10.2011

I did, now I got those:

Код:
C:\Users\Robin\Documents\filterscripts\Anims.pwn(56) : error 036: empty statement
C:\Users\Robin\Documents\filterscripts\Anims.pwn(60) : error 029: invalid expression, assumed zero



Re: Error 036 - How to solve? - DaRkAnGeL[NBK] - 17.10.2011

pawn Код:
if (strcmp(cmdtext, "/relax", true) == 0)
        {
        ApplyAnimation(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
        GameTextForPlayer( playerid, "~w~To stop the animation, ~n~type ~r~/stopanim ~w~!", 5000, 3 );
        }
        return 1;
        }
you will need to add the PlayerCuffed cos i could test with that


Re: Error 036 - How to solve? - Supercop - 17.10.2011

PlayerCuffed is definied.


Re: Error 036 - How to solve? - SmiT - 17.10.2011

Excuse me, had a little typo.
pawn Код:
else if (strcmp(cmdtext, "/relax", true) == 0 )
    {
        if(GetPVarInt(playerid, "Injured") != 0 || PlayerCuffed[ playerid ] != 0 || GetPVarInt(playerid, "Hospital") != 0 )
        {
            SendClientMessage (playerid, COLOR_GRAD2, "You cannot do this at this time.");
        }
        else
        {
            ApplyAnimation(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
            GameTextForPlayer( playerid, "~w~To stop the animation, ~n~type ~r~/stopanim ~w~!", 5000, 3 );
        }
        return 1;
    }



Re: Error 036 - How to solve? - Supercop - 17.10.2011

Quote:
Originally Posted by SmiT
Посмотреть сообщение
Excuse me, had a little typo.
pawn Код:
else if (strcmp(cmdtext, "/relax", true) == 0 )
    {
        if(GetPVarInt(playerid, "Injured") != 0 || PlayerCuffed[ playerid ] != 0 || GetPVarInt(playerid, "Hospital") != 0 )
        {
            SendClientMessage (playerid, COLOR_GRAD2, "You cannot do this at this time.");
        }
        else
        {
            ApplyAnimation(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
            GameTextForPlayer( playerid, "~w~To stop the animation, ~n~type ~r~/stopanim ~w~!", 5000, 3 );
        }
        return 1;
    }
That works, thanks!

But I don't see the difference, can you tell me?