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: Command error (
/showthread.php?tid=441909)
Command error -
San1 - 04.06.2013
This command i got is not letting me compile My gamemode.. i think its the brackets idk
Код:
CMD:wheels(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] <= 4 || PlayerInfo[playerid][pJob] != 7 || PlayerInfo[playerid][pJob2] != 7)
{
SendClientMessageEx(playerid, COLOR_GREY, " You are not a Car Mechanic or Level 4 Admin!");
return 1;
)
new Player;
if(!IsPlayerInAnyVehicle(Player)) return SendClientMessage(playerid,COLOR_RED, "You are not in any vehicle!");
ShowPlayerDialog(playerid, 199, DIALOG_STYLE_LIST, "Wheels", "Shadow\nMega\nRimshine\nWires\nClassic\nTwist\nCutter\nSwitch\nGrove\nImport\nDollar\nTrance\nAtomic\nAhab\nVirtual\nAccess\nOffroad", "OK", "ESC");
return 1;
}
Re: Command error -
Scenario - 04.06.2013
pawn Код:
if(PlayerInfo[playerid][pAdmin] <= 4 || PlayerInfo[playerid][pJob] != 7 || PlayerInfo[playerid][pJob2] != 7)
{
SendClientMessageEx(playerid, COLOR_GREY, " You are not a Car Mechanic or Level 4 Admin!");
return 1;
)
See the problem? Look very closely using your eyes...
Re: Command error -
SwisherSweet - 04.06.2013
where are the errorS?
Re: Command error -
park4bmx - 04.06.2013
pawn Код:
CMD:wheels(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] <= 4 || PlayerInfo[playerid][pJob] != 7 || PlayerInfo[playerid][pJob2] != 7) return SendClientMessageEx(playerid, COLOR_GREY, " You are not a Car Mechanic or Level 4 Admin!");
new Player;
if(!IsPlayerInAnyVehicle(Player)) return SendClientMessage(playerid,COLOR_RED, "You are not in any vehicle!");
ShowPlayerDialog(playerid, 199, DIALOG_STYLE_LIST, "Wheels", "Shadow\nMega\nRimshine\nWires\nClassic\nTwist\nCutter\nSwitch\n\
Grove\nImport\nDollar\nTrance\nAtomic\nAhab\nVirtual\nAccess\nOffroad", "OK", "ESC");
return 1;
}
Re: Command error -
Littlehelper - 04.06.2013
pawn Код:
CMD:wheels(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] <= 4 || PlayerInfo[playerid][pJob] != 7 || PlayerInfo[playerid][pJob2] != 7) return SendClientMessage(playerid,-1,"Can't use it buddy");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1, "You are not in any vehicle!");
ShowPlayerDialog(playerid, 199, DIALOG_STYLE_LIST, "Wheels", "Shadow\nMega\nRimshine\nWires\nClassic\nTwist\nCutter\nSwitch\nGrove\nImport\nDollar\nTrance\nAtomic\nAhab\nVirtual\nAccess\nOffroad", "OK", "ESC");
return 1;
}
Re: Command error -
San1 - 04.06.2013
There is alot of errors becuz of missing brackets and stuff.. And Realcop the code was indented wrong when i pasted
Код:
CMD:wheels(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] <= 4 || PlayerInfo[playerid][pJob] != 7 || PlayerInfo[playerid][pJob2] != 7)
{
SendClientMessageEx(playerid, COLOR_GREY, " You are not a Car Mechanic or Level 4 Admin!");
return 1;
)
new Player;
if(!IsPlayerInAnyVehicle(Player)) return SendClientMessage(playerid,COLOR_RED, "You are not in any vehicle!");
ShowPlayerDialog(playerid, 199, DIALOG_STYLE_LIST, "Wheels", "Shadow\nMega\nRimshine\nWires\nClassic\nTwist\nCutter\nSwitch\nGrove\nImport\nDollar\nTrance\nAtomic\nAhab\nVirtual\nAccess\nOffroad", "OK", "ESC");
return 1;
}
Re: Command error -
San1 - 04.06.2013
Rep to you littlehelper thanks
Re: Command error -
SwisherSweet - 04.06.2013
Код:
CMD:wheels(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] <= 4 || PlayerInfo[playerid][pJob] != 7 || PlayerInfo[playerid][pJob2] != 7)
{
SendClientMessageEx(playerid, COLOR_GREY, " You are not a Car Mechanic or Level 4 Admin!");
return 1;
}//becarefull here you did )
new Player;
if(!IsPlayerInAnyVehicle(Player)) return SendClientMessage(playerid,COLOR_RED, "You are not in any vehicle!");
ShowPlayerDialog(playerid, 199, DIALOG_STYLE_LIST, "Wheels", "Shadow\nMega\nRimshine\nWires\nClassic\nTwist\nCutter\nSwitch\nGrove\nImport\nDollar\nTrance\nAtomic\nAhab\nVirtual\nAccess\nOffroad", "OK", "ESC");
return 1;
}