Help here a bit? - 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: Help here a bit? (
/showthread.php?tid=348679)
Help here a bit? -
N0FeaR - 06.06.2012
../gamemodes/OnPlayerCommandZCMD.pwn(2842) : error 010: invalid function or declaration
pawn Код:
}
COMMAND:leadercmds(playerid, params[])
{
if(PlayerInfo[playerid][pFaction] != 0 && PlayerInfo[playerid][pRank] == 13 || PlayerInfo[playerid][pRank] == 12)
{
new string[128];
format(string, sizeof(string), "Leader Commands\n\n/invite /uninvite /setrank /ranks\n/factionspawn /fchat /jobpermission");
ShowPlayerDialog(playerid, 99, DIALOG_STYLE_MSGBOX, "Info Box",string, "Ok","");
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command.");
}
}
line 2842 return 1;
Re: Help here a bit? -
tiernantheman - 06.06.2012
pawn Код:
COMMAND:leadercmds(playerid, params[])
{
if(PlayerInfo[playerid][pFaction] != 0 && PlayerInfo[playerid][pRank] == 13 || PlayerInfo[playerid][pRank] == 12)
{
new string[128];
format(string, sizeof(string), "Leader Commands\n\n/invite /uninvite /setrank /ranks\n/factionspawn /fchat /jobpermission");
ShowPlayerDialog(playerid, 99, DIALOG_STYLE_MSGBOX, "Info Box",string, "Ok","");
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command.");
}
}
return 1;
}
You missed the ending bracket
Re: Help here a bit? -
blewert - 06.06.2012
return 1; is outside of command, leadercmds never returns anything?
Re: Help here a bit? -
JaKe Elite - 06.06.2012
pawn Код:
COMMAND:leadercmds(playerid, params[])
{
if(PlayerInfo[playerid][pFaction] != 0 && PlayerInfo[playerid][pRank] == 13 || PlayerInfo[playerid][pRank] == 12)
{
new string[128];
format(string, sizeof(string), "Leader Commands\n\n/invite /uninvite /setrank /ranks\n/factionspawn /fchat /jobpermission");
ShowPlayerDialog(playerid, 99, DIALOG_STYLE_MSGBOX, "Info Box",string, "Ok","");
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command.");
}
return 1;
}
EDIT:
1 minute late