1 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: 1 Error (
/showthread.php?tid=489342)
1 Error -
Tuntun - 22.01.2014
Код:
CMD:acmds(playerid,params[])
{
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] <= 1)
{
I DONT WANT TO SHOW THE SENDCLIENTMESSAGES.
}
return 1;
}
error:
Код:
error 030: compound statement not closed at the end of file (started at line 2535)
I want that only server moderator can see it.. only level 1
Re: 1 Error -
DerickClark - 22.01.2014
what?
Re: 1 Error -
itsCody - 22.01.2014
pawn Код:
CMD:acmds(playerid,params[])
{
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] <= 1)
{
I DONT WANT TO SHOW THE SENDCLIENTMESSAGES.
}
}
return 1;
}
??
I don't see the error but I did find a missing bracket.
Maybe that's it?
Re: 1 Error -
Tuntun - 22.01.2014
it works but it is possible to make /acmds for all admins? i mean i added this:
Код:
CMD:acmds2(playerid,params[])
{
if (APlayerData[playerid][LoggedIn] == true)
{
MY SENDCLIENTMESSAGES I DONT WANT TO SHOW IT
}
}
return 1;
}
CMD:acmds3(playerid,params[])
{
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 3)
{
MY SENDCLIENTMESSAGES I DONT WANT TO SHOW IT
}
}
return 1;
}
CMD:acmds4(playerid,params[])
{
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 4)
{
MY SENDCLIENTMESSAGES I DONT WANT TO SHOW IT
}
}
return 1;
}
Like : if level 1 admin types: /acmds > he will only see the level 1 sendclientmessage.
same thing for all ranks. i like if level 2 admin types /acmds he will only see the level 2 commands..
Re: 1 Error -
itsCody - 22.01.2014
Try
pawn Код:
CMD:acmds(playerid,params[])
{
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] < 1)
return SendClientMessage(playerid,-1,"{B30000}[ERROR] {FFFFFF}You don't have access to this command.");
if (APlayerData[playerid][PlayerLevel] == 1)
{
I DONT WANT TO SHOW THE SENDCLIENTMESSAGES.
}
else if (APlayerData[playerid][PlayerLevel] == 2)
{
// admin level 2
}
else if (APlayerData[playerid][PlayerLevel] == 3)
{
// admin level 3
}
else if (APlayerData[playerid][PlayerLevel] == 4)
{
// admin level 4
}
}
return 1;
}
and just keep repeating it for the amount of admin levels u have.
Full code -
Najdobar - 22.01.2014
Код:
CMD:acmds(playerid,params[])
{
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] < 1)
return SendClientMessage(playerid,-1,"{B30000}[ERROR] {FFFFFF}You don't have access to this command.");
if (APlayerData[playerid][PlayerLevel] >= 1)
{
I DONT WANT TO SHOW THE SENDCLIENTMESSAGES.
}
else if (APlayerData[playerid][PlayerLevel] >= 2)
{
// admin level 2
}
else if (APlayerData[playerid][PlayerLevel] >= 3)
{
// admin level 3
}
else if (APlayerData[playerid][PlayerLevel] >= 4)
{
// admin level 4
}
else if (APlayerData[playerid][PlayerLevel] >= 5)
{
// admin level 5
}
}
return SendClientMessage(playerid, -1,"{B30000}[ERROR] {FFFFFF}You have ti be logged in to use this command !");
Re: 1 Error -
ACI - 22.01.2014
An unexpected end of file occurred. One or more compound
statements are still unfinished (i.e. the closing brace "}" has not
been found). The error line number where the compound statement
started is given in the message.