[Hlep] Warnings
#1

hey i have a question its a warning
when i do compleat / run in the script i get 57 warnings every one it says
warning 217: loose indentation

what it is exactly ? warning 217: loose indentation
Reply
#2

tab it in ¬¬

pawn Код:
}
 return 1;
}
Loose indentation ^

pawn Код:
}
  return 1;
}
Proper indentation

P.S warnings dont harm the server :P
Reply
#3

Quote:
Originally Posted by JaYmE
tab it in ¬¬

pawn Код:
}
 return 1;
}
Loose indentation ^

pawn Код:
}
  return 1;
}
Proper indentation

P.S warnings dont harm the server :P
Aha okej thx good but its there on some commands too like /detain and that stuff and in the mittle of the commands but thx any way this will help me much
Reply
#4

its 1 tab in per if statement.. for example..

public/stock statements have 0 tab spaces.
The code in those are 1 tab space.
If there is a if statement inside, the condition is 1 tab space, open bracket, then 2 tab spaces.. Example given:
pawn Код:
public OnGameModeInit {
  if (somevariable == 1) {
    if (someothervariable == 255) {
      print("This is the way things should be indented.");
    }
    else {
      print("This will prevent 'loose indentation' warnings.");
    }
    if (anothervariable == 60) {
      if (thereisanifinaif == 1) {
        tabagain=1;
      }
    }
  }
  return 1;
}
Reply
#5

At top of script
pawn Код:
#pragma tabsize 0
Or something like that
Reply
#6

Quote:
Originally Posted by Chrysanthemum
At top of script
pawn Код:
#pragma tabsize 0
Or something like that
Indenting properly is the clean, professional, and least hassle way of doing things. I recommend NOT using pragma tabsize 0.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)