StartPizza Command Error
#1

Код:
	if(strcmp(cmd, "/pizzaduty", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
  			if(PlayerInfo[playerid][pJob] == 17)
   			{
       			if(JobDuty[playerid] == 1)
       			{
           			SendClientMessage(playerid, COLOR_WHITE, "* You are now Off Duty from your Pizza Delivery Job and will not receive calls anymore.");
           			JobDuty[playerid] = 0;
           			new pizzaskin;
           			pizzaskin = PlayerInfo[playerid][pChar];
           			SetPlayerSkin(playerid, pizzaskin);
           			PizzaBoys -= 1;
       			}
       			else
       			{
           			SendClientMessage(playerid, COLOR_WHITE, "* You are now On Duty with your Pizza Delivery Job and will receive calls from people in need.");
           			JobDuty[playerid] = 1;
        			PizzaBoys += 1;
        			GetPlayerName(playerid,sendername,sizeof(sendername));
        			SetPlayerSkin(playerid, 155);
   					format(string, sizeof(string), "[Advert] Well stacked pizza worker %s is now On Duty, /call 111 to order a pizza.", sendername);
	    			OOCNews(0xFF7E00AA,string);
				}
				else
				{
			    	SendClientMessage(playerid, COLOR_WHITE, "You are not a pizza boy!");
					return 1;
				}
			}
		}
	}
Error I'm getting:

Код:
C:\Users\matthew\Desktop\V2 NG LS;RP\gamemodes\larp.pwn(41507) : error 029: invalid expression, assumed zero
Please could someone fix this?
Reply
#2

Witch one is the line 41507
Reply
#3

Код:
				else
				{
			    	SendClientMessage(playerid, COLOR_WHITE, "You are not a pizza boy!");
					return 1;
				}
The last else.
Reply
#4

pawn Код:
if(strcmp(cmd, "/pizzaduty", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pJob] == 17)
            {
                if(JobDuty[playerid] == 1)
                {
                    SendClientMessage(playerid, COLOR_WHITE, "* You are now Off Duty from your Pizza Delivery Job and will not receive calls anymore.");
                    JobDuty[playerid] = 0;
                    new pizzaskin;
                    pizzaskin = PlayerInfo[playerid][pChar];
                    SetPlayerSkin(playerid, pizzaskin);
                    PizzaBoys -= 1;
                }
                else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "* You are now On Duty with your Pizza Delivery Job and will receive calls from people in need.");
                    JobDuty[playerid] = 1;
                    PizzaBoys += 1;
                    GetPlayerName(playerid,sendername,sizeof(sendername));
                    SetPlayerSkin(playerid, 155);
                    format(string, sizeof(string), "[Advert] Well stacked pizza worker %s is now On Duty, /call 111 to order a pizza.", sendername);
                    OOCNews(0xFF7E00AA,string);
                }
               
            }
             else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "You are not a pizza boy!");
                    return 1;
                }
                }
    }
PHP код:
use [pawncode here[/pawn] for pawno code 
Reply
#5

Sorry that code will not gonna work i mixed things up this one will
pawn Код:
if(strcmp(cmd, "/pizzaduty", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pJob] == 17)
            {
                if(JobDuty[playerid] == 1)
                {
                    SendClientMessage(playerid, COLOR_WHITE, "* You are now Off Duty from your Pizza Delivery Job and will not receive calls anymore.");
                    JobDuty[playerid] = 0;
                    new pizzaskin;
                    pizzaskin = PlayerInfo[playerid][pChar];
                    SetPlayerSkin(playerid, pizzaskin);
                    PizzaBoys -= 1;
                }
                else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "* You are now On Duty with your Pizza Delivery Job and will receive calls from people in need.");
                    JobDuty[playerid] = 1;
                    PizzaBoys += 1;
                    GetPlayerName(playerid,sendername,sizeof(sendername));
                    SetPlayerSkin(playerid, 155);
                    format(string, sizeof(string), "[Advert] Well stacked pizza worker %s is now On Duty, /call 111 to order a pizza.", sendername);
                    OOCNews(0xFF7E00AA,string);
                }
               
            }
            else
            {
            SendClientMessage(playerid, COLOR_WHITE, "You are not a pizza boy!");
                    return 1;
            }
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)