Please help guys warning 217: loose indentation
#1

I have 4 errors than i fixed 3 errors right now and 1 error left can somebody to help me please without #pragma tabsize 0

Errors:
Код HTML:
C:\Icons\Samp Fajlovi\UGRP V2.0\gamemodes\UGRPG.pwn(33758) : warning 217: loose indentation
Код:
if (strcmp(cmd, "/pusti", true) == 0)
	{
	  	tmp = strtok(cmdtext, idx);
		giveplayerid = strval(tmp);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_GRAD2, "Koristenje: /pusti [playerid]");
			return 1;
		}
	  	if(gTeam[playerid] == 2 || IsACop(playerid))
		{
			if(DragTimer[playerid] >= 0)
		{
			 if(PlayerCuffed[giveplayerid] == 1)
			{
				TogglePlayerControllable(giveplayerid, 0);
			}
		  		GetPlayerName(giveplayerid, sendername, sizeof(sendername));
				GetPlayerName(playerid, playername, sizeof(playername));
			  	format(string, sizeof(string), "%s je pustio %s", playername, sendername);
				ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				KillTimer(DragTimer[playerid]);
				DragTimer[playerid] = 0;
				TogglePlayerControllable(giveplayerid, 1);
				return 1;
			}
    	}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "  Niste Policajac / FBI agent / S.W.A.T !");
		}
		return 1;
	}
Red line is:
Код HTML:
C:\Icons\Samp Fajlovi\UGRP V2.0\gamemodes\UGRPG.pwn(33758) : warning 217: loose indentation
Reply
#2

You could just ignore it.
Or try this
pawn Код:
if (strcmp(cmd, "/pusti", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        giveplayerid = strval(tmp);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "Koristenje: /pusti [playerid]");
            return 1;
        }
        if(gTeam[playerid] == 2 || IsACop(playerid))
        {
            if(DragTimer[playerid] >= 0)
        {
             if(PlayerCuffed[giveplayerid] == 1)
            {
                TogglePlayerControllable(giveplayerid, 0);
            }
            GetPlayerName(giveplayerid, sendername, sizeof(sendername));
            GetPlayerName(playerid, playername, sizeof(playername));
            format(string, sizeof(string), "%s je pustio %s", playername, sendername);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            KillTimer(DragTimer[playerid]);
            DragTimer[playerid] = 0;
            TogglePlayerControllable(giveplayerid, 1);
            return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "  Niste Policajac / FBI agent / S.W.A.T !");
        }
        return 1;
    }
Reply
#3

1.its just a warning not a error
2.caused due to wrong spaces in between lines in a fucntio
try..
pawn Код:
if(gTeam[playerid] == 2 || IsACop(playerid))
        {
            if(DragTimer[playerid] >= 0)
                {
            if(PlayerCuffed[giveplayerid] == 1)
            {
            TogglePlayerControllable(giveplayerid, 0);
            }
            GetPlayerName(giveplayerid, sendername, sizeof(sendername));
            GetPlayerName(playerid, playername, sizeof(playername));
            format(string, sizeof(string), "%s je pustio %s", playername, sendername);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            KillTimer(DragTimer[playerid]);
            DragTimer[playerid] = 0;
            TogglePlayerControllable(giveplayerid, 1);
            return 1;
            }
        }
3.dont these to occur set the spaces size to 0 from default
pawn Код:
#pragma tabsize 0
Reply
#4

another way is to add this at the top of your script and you'll never get it.

Not recommended though.

pawn Код:
#pragma tabsize 0
Reply
#5

Quote:
Originally Posted by ESGaming
Посмотреть сообщение
another way is to add this at the top of your script and you'll never get it.

Not recommended though.

pawn Код:
#pragma tabsize 0
He asked to not use that.
Reply
#6

Thank you guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)