[Help]Help for aduty plz :p
#1

Код:
V:/server/momo2.pwn(19470) : warning 217: loose indentation
V:/server/momo2.pwn(19477) : warning 217: loose indentation
V:/server/momo2.pwn(19478) : warning 217: loose indentation
V:/server/momo2.pwn(19486) : warning 217: loose indentation
V:/server/momo2.pwn(19488) : warning 217: loose indentation
V:/server/momo2.pwn(19495) : warning 217: loose indentation
V:/server/momo2.pwn(19496) : warning 217: loose indentation
V:/server/momo2.pwn(19504) : warning 217: loose indentation
V:/server/momo2.pwn(19507) : warning 217: loose indentation
Eror for :
Код:
if (strcmp(cmd,"/aduty",true) == 0)
  {
    if(IsPlayerConnected(playerid))
    {
     if (PlayerInfo[playerid][pAdmin] >= 1)
     {
		GetPlayerName(playerid, sendername, sizeof(sendername));
           format(string, sizeof(string), "Admin %s ********.", sendername);
      SendClientMessageToAll(COLOR_YELLOW, string);
      SetPlayerColor(playerid,COLOR_YELLOW);
     }
     else
     {
      SendClientMessage(playerid, COLOR_RED, "***********!");
     }
   }
   return 1;
  }
  if (strcmp(cmd,"/adutyoff",true) == 0)
  {
    if(IsPlayerConnected(playerid))
    {
     if (PlayerInfo[playerid][pAdmin] >= 1)
     {
      GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "Admin %s is duty off", sendername);
      SendClientMessageToAll(COLOR_YELLOW, string);
      SetPlayerColor(playerid,COLOR_WHITE);
     }
     else
     {
      SendClientMessage(playerid, COLOR_GRAD1, "You are not admin.");
     }
   }
   return 1;
  }
Help me please.
Reply
#2

http://forum.sa-mp.com/index.php?topic=61893.0

or just put #pragma tabsize 0 at the top on your script
Reply
#3

"loose indentation" means that your code is not aligned. For example:

Код:
   GetPlayerName(playerid, sendername, sizeof(sendername));
           format(string, sizeof(string), "Admin %s ********.", sendername);
      SendClientMessageToAll(COLOR_YELLOW, string);
      SetPlayerColor(playerid,COLOR_YELLOW);
Should be:

Код:
      GetPlayerName(playerid, sendername, sizeof(sendername));
      format(string, sizeof(string), "Admin %s ********.", sendername);
      SendClientMessageToAll(COLOR_YELLOW, string);
      SetPlayerColor(playerid,COLOR_YELLOW);
PAWNO likes it neat.
Reply
#4

Please use the code type , write your code
Код:
here
Reply
#5

Thank alot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)