StartPizza Command 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: StartPizza Command Error (
/showthread.php?tid=375984)
StartPizza Command Error -
UnknownGamer - 08.09.2012
Код:
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?
Re: StartPizza Command Error -
Gangster-rocks - 08.09.2012
Witch one is the line 41507
Re: StartPizza Command Error -
UnknownGamer - 08.09.2012
Код:
else
{
SendClientMessage(playerid, COLOR_WHITE, "You are not a pizza boy!");
return 1;
}
The last else.
Re: StartPizza Command Error -
Gangster-rocks - 08.09.2012
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 [pawn] code here[/pawn] for pawno code
Re: StartPizza Command Error -
Gangster-rocks - 08.09.2012
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;
}
}
}