Need help when compiling
#1

I've got some of errors, and i don't know how to solve them, so i need your's help.

The error:

Код:
D:\samp\samp02Xserver\gamemodes\rl.pwn(454) : warning 217: loose indentation
D:\samp\samp02Xserver\gamemodes\rl.pwn(457) : warning 217: loose indentation
2 Warnings.
These lines:

Код:
  	if (strcmp(cmd, "/shout", true) == 0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	      new str[256], pname[256];
        GetPlayerName(playerid, pname, 256);
        format(str, 256, "[SHOUT]%s %s", pname, cmdtext[4]);
        SendClientMessageToAll(pCol, str);
        	return 1;
	 		}
   		if(gPlayerLogged[playerid] == 0)
	    {
       SendClientMessage(playerid, COLOR_GREY, "[!] You must first register or login! Please use !help for commands.");
	      return 1;
	    }
		}
How i can fix it?
Reply
#2

Indent you code in the right way.

pawn Код:
if (strcmp(cmd, "/shout", true) == 0 )
{
  if(IsPlayerConnected(playerid))
  {
    if(gPlayerLogged[playerid] == 0)
    {
      SendClientMessage(playerid, COLOR_GREY, "[!] You must first register or login! Please use !help for commands.");
      return 1;
    }
    new str[256], pname[256];
    GetPlayerName(playerid, pname, 256);
    format(str, 256, "[SHOUT]%s %s", pname, cmdtext[4]);
    SendClientMessageToAll(pCol, str);
    return 1;
  }
}

Reply
#3

Quote:
Originally Posted by Vince
Indent you code in the right way.

pawn Код:
if (strcmp(cmd, "/shout", true) == 0 )
{
  if(IsPlayerConnected(playerid))
  {
    if(gPlayerLogged[playerid] == 0)
    {
      SendClientMessage(playerid, COLOR_GREY, "[!] You must first register or login! Please use !help for commands.");
      return 1;
    }
    new str[256], pname[256];
    GetPlayerName(playerid, pname, 256);
    format(str, 256, "[SHOUT]%s %s", pname, cmdtext[4]);
    SendClientMessageToAll(pCol, str);
    return 1;
  }
}

Quote:

Then i copy this in my script, that two errors won't disappeared, they're still, how i can fix it, without errors?

Sorry. Thanks for the fix i glad because you helped me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)