SA-MP Forums Archive
Need help when compiling - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help when compiling (/showthread.php?tid=67800)



Need help when compiling - Bubastis - 04.03.2009

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?


Re: Need help when compiling - Vince - 04.03.2009

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;
  }
}




Re: Need help when compiling - Bubastis - 04.03.2009

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