HelP loose indentation
#1

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


1 Warning.
;
Код:
16    if (strcmp("/gps", cmdtext, true, 10) == 0)
17
18    ShowPlayerDialog(playerid, GPS, DIALOG_STYLE_LIST,"Hedefi belirleyiniz","LSPD\nBelediye\n24/7\nDMV\nBenzin İstasyonu\nPig Pen\nAlhambra\nHastane\nCounty General Hospital\nBanka\nJefferson\nKilise\nTurn off GPS","Mark","Close");
19		return 1;
20	}
Reply
#2

Quote:
Originally Posted by ByKoRsSaN
Посмотреть сообщение
Код:
warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
;
Код:
16    if (strcmp("/gps", cmdtext, true, 10) == 0)
17
18    ShowPlayerDialog(playerid, GPS, DIALOG_STYLE_LIST,"Hedefi belirleyiniz","LSPD\nBelediye\n24/7\nDMV\nBenzin İstasyonu\nPig Pen\nAlhambra\nHastane\nCounty General Hospital\nBanka\nJefferson\nKilise\nTurn off GPS","Mark","Close");
19		return 1;
20	}
pawn Код:
if (strcmp("/gps", cmdtext, true, 10) == 0)
{
    ShowPlayerDialog(playerid, GPS, DIALOG_STYLE_LIST,"Hedefi belirleyiniz","LSPD\nBelediye\n24/7\nDMV\nBenzin Istasyonu\nPig Pen\nAlhambra\nHastane\nCounty General Hospital\nBanka\nJefferson\nKilise\nTurn off GPS","Mark","Close");
    return 1;
}
I know this won't fix the problem, but for future references, You can add
Код:
#pragma tabsize 0
to get rid of Indentations.
Reply
#3

Wrong brace!
pawn Код:
if (strcmp("/gps", cmdtext, true, 10) == 0)
{
    ShowPlayerDialog(playerid, GPS, DIALOG_STYLE_LIST,"Hedefi belirleyiniz","LSPD\nBelediye\n24/7\nDMV\nBenzin Istasyonu\nPig Pen\nAlhambra\nHastane\nCounty General Hospital\nBanka\nJefferson\nKilise\nTurn off GPS","Mark","Close");
    return 1;
}
Reply
#4

Make sure you have the spaces exactly like this..

pawn Код:
if(strcmp("/gps", cmdtext, true, 10) == 0)
{
    ShowPlayerDialog(playerid, GPS, DIALOG_STYLE_LIST,"Hedefi belirleyiniz","LSPD\nBelediye\n24/7\nDMV\nBenzin İstasyonu\nPig Pen\nAlhambra\nHastane\nCounty General Hospital\nBanka\nJefferson\nKilise\nTurn off GPS","Mark","Close");
    return 1;
}
Reply
#5

Why are you using 10 here?
pawn Код:
if (strcmp("/gps", cmdtext, true, 10) == 0)
The no. 10 there is for the no. of characters in your command. So it should be
pawn Код:
if (strcmp("/gps", cmdtext, true, 4) == 0)
4 because its of 4 characters "/gps".
Reply
#6

For more info: https://sampforum.blast.hk/showthread.php?tid=256961
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)