[SOLVED] Command Errors. Need help. -
Champ - 05.07.2013
pawn Код:
COMMAND:acmds(playerid, params[])
{
if(GetPVarInt(playerid, "PlayerAdminLevel") < 1) return SCM(playerid, COLOR_RED, "You need to be admin to use this command!");
if(GetPVarInt(playerid, "PlayerAdminLevel") == 1){
SCM(playerid,-1,""COL_YELLOW"=======Commands=======");
SCM(playerid,-1,""COL_YELLOW"Level 1:"COL_RED" /say | /(un)freeze | /goto | /[un]mute ");}
if(GetPVarInt(playerid, "PlayerAdminLevel") == 2){
SCM(playerid,-1,""COL_YELLOW"=======Commands=======");
SCM(playerid,-1,""COL_YELLOW"Level 1:"COL_RED" /say | /(un)freeze | /goto | /[un]mute ");}
SCM(playerid,-1,""COL_YELLOW"Level 2:"COL_RED" /kick | /announce | /bring | /drop | /(un)jail | /spawn | /ip ");
if(GetPVarInt(playerid, "PlayerAdminLevel") == 3){
SCM(playerid,-1,""COL_YELLOW"=======Commands=======");
SCM(playerid,-1,""COL_YELLOW"Level 1:"COL_RED" /say | /(un)freeze | /goto | /[un]mute ");}
SCM(playerid,-1,""COL_YELLOW"Level 2:"COL_RED" /kick | /announce | /bring | /drop | /(un)jail | /spawn | /ip ");
SCM(playerid,-1,""COL_YELLOW"Level 3:"COL_RED" /slay | /explode | /ban | /setdeaths | /setkills ");}
if(GetPVarInt(playerid, "PlayerAdminLevel") == 4){
SCM(playerid,-1,""COL_YELLOW"=======Commands=======");
SCM(playerid,-1,""COL_YELLOW"Level 1:"COL_RED" /say | /(un)freeze | /goto | /[un]mute |");}
SCM(playerid,-1,""COL_YELLOW"Level 2:"COL_RED" /kick | /announce | /bring | /drop | /(un)jail | /spawn | /ip ");
SCM(playerid,-1,""COL_YELLOW"Level 3:"COL_RED" /slay | /explode | /ban | /setdeaths | /setkills ");}
SCM(playerid,-1,""COL_YELLOW"Level 4:"COL_RED" /setscore | /setmoney | /setplayerbank | /healall | /armourall | /disarm | /unban");}
if(GetPVarInt(playerid, "PlayerAdminLevel") == 5){
SCM(playerid,-1,""COL_YELLOW"=======Commands=======");
SCM(playerid,-1,""COL_YELLOW"Level 1:"COL_RED" /say | /(un)freeze | /goto | /[un]mute |");}
SCM(playerid,-1,""COL_YELLOW"Level 2:"COL_RED" /kick | /announce | /bring | /drop | /(un)jail | /spawn | /ip ");
SCM(playerid,-1,""COL_YELLOW"Level 3:"COL_RED" /slay | /explode | /ban | /setdeaths | /setkills ");}
SCM(playerid,-1,""COL_YELLOW"Level 4:"COL_RED" /setscore | /setmoney | /setplayerbank | /healall | /armourall | /disarm | /unban");}
SCM(playerid,-1,""COL_YELLOW"Level 5:"COL_RED" /setlevel | /gmx ");}
return 0;
}
pawn Код:
warning 209: function "cmd_acmds" should return a value
error 010: invalid function or declaration
error 010: invalid function or declaration
error 010: invalid function or declaration
Re: Command Errors. Need help. -
Cjgogo - 05.07.2013
Replace it with this:
pawn Код:
COMMAND:acmds(playerid, params[])
{
if(GetPVarInt(playerid, "PlayerAdminLevel") < 1) return SCM(playerid, COLOR_RED, "You need to be admin to use this command!");
if(GetPVarInt(playerid, "PlayerAdminLevel") == 1){
SCM(playerid,-1,""COL_YELLOW"=======Commands=======");
SCM(playerid,-1,""COL_YELLOW"Level 1:"COL_RED" /say | /(un)freeze | /goto | /[un]mute ");}
if(GetPVarInt(playerid, "PlayerAdminLevel") == 2){
SCM(playerid,-1,""COL_YELLOW"=======Commands=======");
SCM(playerid,-1,""COL_YELLOW"Level 1:"COL_RED" /say | /(un)freeze | /goto | /[un]mute ");
SCM(playerid,-1,""COL_YELLOW"Level 2:"COL_RED" /kick | /announce | /bring | /drop | /(un)jail | /spawn | /ip ");}
if(GetPVarInt(playerid, "PlayerAdminLevel") == 3){
SCM(playerid,-1,""COL_YELLOW"=======Commands=======");
SCM(playerid,-1,""COL_YELLOW"Level 1:"COL_RED" /say | /(un)freeze | /goto | /[un]mute ");
SCM(playerid,-1,""COL_YELLOW"Level 2:"COL_RED" /kick | /announce | /bring | /drop | /(un)jail | /spawn | /ip ");
SCM(playerid,-1,""COL_YELLOW"Level 3:"COL_RED" /slay | /explode | /ban | /setdeaths | /setkills ");}
if(GetPVarInt(playerid, "PlayerAdminLevel") == 4){
SCM(playerid,-1,""COL_YELLOW"=======Commands=======");
SCM(playerid,-1,""COL_YELLOW"Level 1:"COL_RED" /say | /(un)freeze | /goto | /[un]mute |");
SCM(playerid,-1,""COL_YELLOW"Level 2:"COL_RED" /kick | /announce | /bring | /drop | /(un)jail | /spawn | /ip ");
SCM(playerid,-1,""COL_YELLOW"Level 3:"COL_RED" /slay | /explode | /ban | /setdeaths | /setkills ");
SCM(playerid,-1,""COL_YELLOW"Level 4:"COL_RED" /setscore | /setmoney | /setplayerbank | /healall | /armourall | /disarm | /unban");}
if(GetPVarInt(playerid, "PlayerAdminLevel") == 5){
SCM(playerid,-1,""COL_YELLOW"=======Commands=======");
SCM(playerid,-1,""COL_YELLOW"Level 1:"COL_RED" /say | /(un)freeze | /goto | /[un]mute |");
SCM(playerid,-1,""COL_YELLOW"Level 2:"COL_RED" /kick | /announce | /bring | /drop | /(un)jail | /spawn | /ip ");
SCM(playerid,-1,""COL_YELLOW"Level 3:"COL_RED" /slay | /explode | /ban | /setdeaths | /setkills ");
SCM(playerid,-1,""COL_YELLOW"Level 4:"COL_RED" /setscore | /setmoney | /setplayerbank | /healall | /armourall | /disarm | /unban");}
SCM(playerid,-1,""COL_YELLOW"Level 5:"COL_RED" /setlevel | /gmx ");}
return 1;
}
Re: Command Errors. Need help. -
Champ - 05.07.2013
thank you but still two errors ↓
pawn Код:
warning 209: function "cmd_acmds" should return a value
error 010: invalid function or declaration
Re: Command Errors. Need help. -
Cjgogo - 05.07.2013
You are concerned that I need the error line as well?
EDIT: Fixed!
pawn Код:
COMMAND:acmds(playerid, params[])
{
if(GetPVarInt(playerid, "PlayerAdminLevel") < 1) return SCM(playerid, COLOR_RED, "You need to be admin to use this command!");
if(GetPVarInt(playerid, "PlayerAdminLevel") == 1){
SCM(playerid,-1,""COL_YELLOW"=======Commands=======");
SCM(playerid,-1,""COL_YELLOW"Level 1:"COL_RED" /say | /(un)freeze | /goto | /[un]mute ");}
if(GetPVarInt(playerid, "PlayerAdminLevel") == 2){
SCM(playerid,-1,""COL_YELLOW"=======Commands=======");
SCM(playerid,-1,""COL_YELLOW"Level 1:"COL_RED" /say | /(un)freeze | /goto | /[un]mute ");
SCM(playerid,-1,""COL_YELLOW"Level 2:"COL_RED" /kick | /announce | /bring | /drop | /(un)jail | /spawn | /ip ");}
if(GetPVarInt(playerid, "PlayerAdminLevel") == 3){
SCM(playerid,-1,""COL_YELLOW"=======Commands=======");
SCM(playerid,-1,""COL_YELLOW"Level 1:"COL_RED" /say | /(un)freeze | /goto | /[un]mute ");
SCM(playerid,-1,""COL_YELLOW"Level 2:"COL_RED" /kick | /announce | /bring | /drop | /(un)jail | /spawn | /ip ");
SCM(playerid,-1,""COL_YELLOW"Level 3:"COL_RED" /slay | /explode | /ban | /setdeaths | /setkills ");}
if(GetPVarInt(playerid, "PlayerAdminLevel") == 4){
SCM(playerid,-1,""COL_YELLOW"=======Commands=======");
SCM(playerid,-1,""COL_YELLOW"Level 1:"COL_RED" /say | /(un)freeze | /goto | /[un]mute |");
SCM(playerid,-1,""COL_YELLOW"Level 2:"COL_RED" /kick | /announce | /bring | /drop | /(un)jail | /spawn | /ip ");
SCM(playerid,-1,""COL_YELLOW"Level 3:"COL_RED" /slay | /explode | /ban | /setdeaths | /setkills ");
SCM(playerid,-1,""COL_YELLOW"Level 4:"COL_RED" /setscore | /setmoney | /setplayerbank | /healall | /armourall | /disarm | /unban");}
if(GetPVarInt(playerid, "PlayerAdminLevel") == 5){
SCM(playerid,-1,""COL_YELLOW"=======Commands=======");
SCM(playerid,-1,""COL_YELLOW"Level 1:"COL_RED" /say | /(un)freeze | /goto | /[un]mute |");
SCM(playerid,-1,""COL_YELLOW"Level 2:"COL_RED" /kick | /announce | /bring | /drop | /(un)jail | /spawn | /ip ");
SCM(playerid,-1,""COL_YELLOW"Level 3:"COL_RED" /slay | /explode | /ban | /setdeaths | /setkills ");
SCM(playerid,-1,""COL_YELLOW"Level 4:"COL_RED" /setscore | /setmoney | /setplayerbank | /healall | /armourall | /disarm | /unban");
SCM(playerid,-1,""COL_YELLOW"Level 5:"COL_RED" /setlevel | /gmx ");}
return 1;
}
Re: Command Errors. Need help. -
Champ - 05.07.2013
SCM(playerid,-1,""COL_YELLOW"Level 5:"COL_RED" /setlevel | /gmx ");}
return 0;
}
the last line.
Re: Command Errors. Need help. -
Cjgogo - 05.07.2013
Yeah, look, I edited my post and fixed it, AND it's "return 1", NOT 0, replace 0 with 1, OK?
Re: Command Errors. Need help. -
Champ - 05.07.2013
thank you for this kind help. + Rep.