SA-MP Forums Archive
Problem while compile - 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: Problem while compile (/showthread.php?tid=616704)



Problem while compile - DarkElement - 09.09.2016

So I pressed F5 to compile, and it gives me 3 warnings, can you help me solve it please?
They come from that code.
Код:
		if (realchat)
		{
			if(gPlayerLogged[playerid] == 0)
			{
				return 0;
			}
			//GetPlayerName(playerid, sendername, sizeof(sendername));
			//format(string, sizeof(string), "%s: %s", sendername, text);
			//ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);

			new szMessage[1000];
			new szPlayerName[32];
			GetPlayerName(playerid, szPlayerName, 32);
			if(PlayerInfo[playerid][pPaintBallG] > 0)
			{
				format(szMessage,sizeof(szMessage),"{BA3FC1}%s [%d kills]{FFFFFF}: %s",szPlayerName,PlayerInfo[playerid][pPaintBallKills],text);
				foreach(Player, idd)
				{
					if(idd != playerid)
					{
						if(PlayerInfo[idd][pPaintBallG] == PlayerInfo[playerid][pPaintBallG])
						{
							SendClientMessage(idd, COLOR_WHITE, szMessage);
						}
					}
				}
			}
			else
			{
			if(PlayerInfo[playerid][pColor] == 0)
			{
				format(szMessage, sizeof(szMessage), "{CECECE}%s:{FFFFFF} %s", szPlayerName, text);
			}
			else if(PlayerInfo[playerid][pColor] == 1)
			{
				format(szMessage, sizeof(szMessage), "{4169E1}%s:{FFFFFF} %s", szPlayerName, text);
			}
			else if(PlayerInfo[playerid][pColor] == 2)
			{
				format(szMessage, sizeof(szMessage), "{662BBE}%s:{FFFFFF} %s", szPlayerName, text);
			}
			else if(PlayerInfo[playerid][pColor] == 3)
			{
				format(szMessage, sizeof(szMessage), "{FFE600}%s:{FFFFFF} %s", szPlayerName, text);
			}
			else if(PlayerInfo[playerid][pColor] == 4)
			{
				format(szMessage, sizeof(szMessage), "{FF00FF}%s:{FFFFFF} %s", szPlayerName, text);
			}
			else if(PlayerInfo[playerid][pColor] == 5)
			{
				format(szMessage, sizeof(szMessage), "{3FFF3F}%s:{FFFFFF} %s", szPlayerName, text);
			}
			else if(PlayerInfo[playerid][pColor] == 6)
			{
				format(szMessage, sizeof(szMessage), "{83D553}%s:{FFFFFF} %s", szPlayerName, text);
			}
			else if(PlayerInfo[playerid][pColor] == 7)
			{
				format(szMessage, sizeof(szMessage), "{187700}%s:{FFFFFF} %s", szPlayerName, text);
			}
			else if(PlayerInfo[playerid][pColor] == 8)
			{
				format(szMessage, sizeof(szMessage), "{FF9A00}%s:{FFFFFF} %s", szPlayerName, text);
			}
			else if(PlayerInfo[playerid][pColor] == 9)
			{
				format(szMessage, sizeof(szMessage), "{222222}%s:{FFFFFF} %s", szPlayerName, text);
			}
			else if(PlayerInfo[playerid][pColor] == 10)
			{
				format(szMessage, sizeof(szMessage), "{FF2C9D}%s:{FFFFFF} %s", szPlayerName, text);
			}
			if(PlayerInfo[playerid][pAcolor] == 0)
			{
			format(szMessage, sizeof(szMessage), "{AB0000}%s:{FFFFFF} %s", szPlayerName, text);
			}
			else if(PlayerInfo[playerid][pAcolor] == 1)
			{
			format(szMessage, sizeof(szMessage), "{E70031}%s:{FFFFFF} %s", szPlayerName, text);
			}
			else if(PlayerInfo[playerid][pAcolor] == 2)
			{
			format(szMessage, sizeof(szMessage), "{F20056}%s:{FFFFFF} %s", szPlayerName, text);
			}
		}
	//MESSAGE SPLIT
		new len = strlen(szMessage),
			_iL = len / EX_SPLITLENGTHH;
		if( ( len % EX_SPLITLENGTHH ) ) _iL++;
		new _Line[EX_SPLITLENGTHH+5];
		new _:_i@Index;
		while( _i@Index < _iL )
		{
			if( _i@Index == 0 )
				strmid( _Line, szMessage, ( _i@Index * EX_SPLITLENGTHH ), ( _i@Index * EX_SPLITLENGTHH ) + EX_SPLITLENGTHH );
			else
				strmid( _Line, szMessage, ( _i@Index * EX_SPLITLENGTHH ), ( _i@Index * EX_SPLITLENGTHH ) + EX_SPLITLENGTHH );
				
			if( _iL > 1 )
			{
				if( _i@Index > 0 )
				{
					format( _Line, sizeof _Line, "... %s", _Line );
			}
		}
			ProxDetector(20.0, playerid, _Line, COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
			_i@Index++;
		}
		format(szMessage, sizeof(szMessage), "\"%s\"", text);
		SetPlayerChatBubble(playerid, szMessage, COLOR_CHATBUBBLE, 15.0, 10000);
		return 0;
	}
	return 1;
}
And this is what it gave me while compiling:

Код:
warning 217: loose indentation
warning 217: loose indentation
warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.



Re: Problem while compile - ThatFag - 09.09.2016

Код:
#pragma tabsize 0
at top of script


Re: Problem while compile - DarkElement - 09.09.2016

Quote:
Originally Posted by ThatFag
Посмотреть сообщение
Код:
#pragma tabsize 0
at top of script
solved, thanks.


Re: Problem while compile - saffierr - 09.09.2016

Don't use pragma to hide warnings ffs.... just fix them, believe me once your script reaches 10k and you keep ignoring and hiding the warnings, you won't be able to fix your errors easily.