Loose indentation
#1

Yo, when i compile my script this happend :


C:\Users\Marko\Desktop\trucking\gamemodes\PPC_Truc king.pwn(787) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.


line 787 :
pawn Код:
switch (classid)

can anyone tell me how to fix this ?


All was normal but when i edited this lines, warning shows
pawn Код:
// This callback gets called when the player is selecting a class (but hasn't clicked "Spawn" yet)
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid,-2181.8604,-248.0030,40.7195);
SetPlayerCameraPos(playerid,-2186.5913,-248.0875,40.7195);
SetPlayerCameraLookAt(playerid,-2181.8604,-248.0030,40.7195);
SetPlayerFacingAngle(playerid,86.9258);

EDIT: i know i can ignore this warning but how i can fix it ? :P


THX ^
Reply
#2

Ident your codes.
Reply
#3

Show us, all your code
Reply
#4

Quote:
Originally Posted by IRio97
Посмотреть сообщение
<removed for sanity - ******>
don't ever use it !

pawn Код:
// This callback gets called when the player is selecting a class (but hasn't clicked "Spawn" yet)
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid,-2181.8604,-248.0030,40.7195);
    SetPlayerCameraPos(playerid,-2186.5913,-248.0875,40.7195);
    SetPlayerCameraLookAt(playerid,-2181.8604,-248.0030,40.7195);
    SetPlayerFacingAngle(playerid,86.9258);
    return 1;
}
Reply
#5

Bump !
Reply
#6

Quote:
Originally Posted by S4ba
Посмотреть сообщение
Bump !
You already got the answer.
Quote:
Originally Posted by DiGiTaL_AnGeL
Посмотреть сообщение
Ident your codes.
If you don't know what 'indent' is and how to do it.
https://sampforum.blast.hk/showthread.php?tid=251335
Read #1 [Part 1: Proper indenting]
Reply
#7

Just add this at top of ur script

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

http://i45.tinypic.com/iw3lnt.png

still same...
Reply
#9

Quote:
Originally Posted by Gamer_007
Посмотреть сообщение
Just add this at top of ur script

pawn Код:
#pragma tabsize 0
All that does is hide the problem, it doesn't make it go away. Very bad advice.

@S4ba learn to indent your code and you can fix it.
Reply
#10

Thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)