SA-MP Forums Archive
Warnings - 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: Warnings (/showthread.php?tid=614357)



Warnings - OnlYgEnyUS - 07.08.2016

Hi. I got 2 warnings and i don't know how to fix them.
I know how to fix "warning 217",but in this case I don't.
Can someone help me?
Thanks.

Here is the code:
Код:
onlyplaygm.pwn(6734) : warning 217: loose indentation
onlyplaygm.pwn(6885) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
================ READY ================
Код:
Line 6734: new Float:xx1,Float:yy1,Float:zz1;
Line 6855: if(tazer[playerid] == 1 && IsACop(playerid) && weaponid == 24)



Re: Warnings - Shinja - 07.08.2016

Its only about spaces, show the code


Re: Warnings - Farzam - 07.08.2016

Just ignore this warning. " loose indentation".


Re: Warnings - OnlYgEnyUS - 07.08.2016

Replied with quote.


Re: Warnings - OnlYgEnyUS - 07.08.2016

Quote:
Originally Posted by Shinja
Посмотреть сообщение
Its only about spaces, show the code
Here is the code:
Код:
			if(tazer[playerid] == 1 && IsACop(playerid) && weaponid == 24)
			{
				if(IsACop(damagedid)) return SendClientMessage(playerid, 0xFFB870FF, "Nu puteti utiliza tazer-ul pe politisti.");
				if(PlayerCuffed[damagedid] == 1) return SendClientMessage(playerid, 0xFFB870FF, "Acest jucator este deja electrocutat.");
				if(PlayerInfo[damagedid][pSleeping] == 1) return SendClientMessage(playerid, 0xFFB870FF, "Jucator electrocutat");
				if(GetDistanceBetweenPlayers(playerid,damagedid) < 15)
				{
					new string[126],sendername[25],giveplayer[25];
					GetPlayerName(playerid,sendername,sizeof(sendername));
					GetPlayerName(damagedid,giveplayer,sizeof(giveplayer));
					format(string, sizeof(string), "* Ai fost electrocutat de %s pentru 8 secunde.", sendername);
					SendClientMessage(damagedid, COLOR_LIGHTBLUE, string);
					format(string, sizeof(string), "* You tazed %s for 8 seconds.", giveplayer);
					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					format(string, sizeof(string), "* %s shoots with his tazer at %s, and tazed him.", sendername ,giveplayer);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					GameTextForPlayer(damagedid, "~r~~h~Tazed", 2500, 3);
					TogglePlayerControllable(damagedid, 0);
					PlayerCuffed[damagedid] = 1;
					PlayerCuffedTime[damagedid] = 8;
					SetPlayerHealthEx(damagedid,100);
				}
			}



Re: Warnings - Freaksken - 07.08.2016

The loose indentation warning just means you have a tab or space too much or too little somewhere around the lines the warning occurs.


Re: Warnings - Luicy. - 07.08.2016

Quote:
Originally Posted by Farzam
Посмотреть сообщение
Just ignore this warning. " loose indentation".
Just no..

Show us the lines above the if()


Re: Warnings - OnlYgEnyUS - 08.08.2016

Nevermind,i solved it. Thanks anyway.


Re: Warnings - Parallex - 08.08.2016

Quote:
Originally Posted by Farzam
Посмотреть сообщение
Just ignore this warning. " loose indentation".
There is something called scripting and it's done neatly.