SA-MP Forums Archive
compile error - 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: compile error (/showthread.php?tid=425830)



compile error - Ananisiki - 26.03.2013

^^^^^^^^


Re: compile error - [..MonTaNa..] - 26.03.2013

pawn Код:
CMD:armour(playerid, params[])
{
    new string[128], name[MAX_PLAYER_NAME], Float:armour;
    if(IsJailed{playerid} == true) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Comand When Jailed.");
    if(isDead[playerid] == 1)
        {
        SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command When Dead.");
        return 1;
    }
    GetPlayerArmour(playerid, armour);
    if(armour >= 100)
    {
        SendClientMessage(playerid, COLOR_RED, "Your Armour Is Already Full.");
        return 1;
    }
    else
    {
    GetPlayerName(playerid, name, sizeof name);
    format(string, sizeof string, "%s (%d) Has Used /armour.", name, playerid);
  //  format(string, sizeof string, "%s (%d) Has Used /armour To Refill His Armour.", name, playerid);
    SetPlayerChatBubble(playerid, "Has Refilled His Armour (/a)", COLOR_YELLOW, 60, 3000);
    MessageToAdmins(COLOR_LIGHTBLUE, string);
//    SendMessageToAdmins(-1, string);
//    MessageToAllAdmins(string, COLOR_FLBLUE);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "You Have Refilled Your Armour.");
    SetPlayerArmour(playerid, 100.0);
    return 1;
    }
}
You was missing a { on:

Код:
	if(isDead[playerid] == 1)
        {
		SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command When Dead.");
		return 1;
	}



Re: compile error - Nivniv2 - 26.03.2013

Mark the error lines so we can help you


Re: compile error - Ananisiki - 26.03.2013

thanks MonTaNaAa, problem solved! REP ++