Warning !! please help
#1

this my command :
PHP код:
if(strcmp(cmd"/a"true) == || strcmp(cmd"/activity"true) == 0)
        {
        new 
string1[128];
        
tmp strtok(cmdtext,idx);
        if(!
strlen(tmp))
        {
    ...................
...........
........ 
I have warning on line :
PHP код:
if(strcmp(cmd"/a"true) == || strcmp(cmd"/activity"true) == 0
warning 217: loose indentation
Why?!?! I try all !!
Reply
#2

Here is what loose indentation cause

Normal (no warning)

pawn Код:
SendClientMessage(playerid, -1, "I love you bro, i'm gay pro");
GameTextForPlayer(playerid, "~w~Wow ~r~You are a gay pro!", 2000, 4);
Not normal (with loose indentation warning)

Код:
      SendClientMessage(playerid, -1, "I love you bro, i'm gay pro");
GameTextForPlayer(playerid, "~w~Wow ~r~You are a gay pro!", 2000, 4);
Reply
#3

Use TAB

pawn Код:
if(strcmp(cmd, "/a", true) == 0 || strcmp(cmd, "/activity", true) == 0)
{
        new string1[128];
        tmp = strtok(cmdtext,idx);
        if(!strlen(tmp))
        {
Reply
#4

dont work ..
have warning !!
why??
Reply
#5

Post the warning we are not mind reader
if you are lazy to fix the warning loose indention use

pawn Код:
#pragma tabsize 0
use this for permanent until you find the line where the warnings begins
Reply
#6

Use TidyPawn to auto-indent your code.
Reply
#7

KING #pragma tabsize 0
but I put the system on Server.cfg || Filerscripts
and the system dont update me on the sever..
on the dos this is load the system but the command dont work
why ? :O
Reply
#8

pawn Код:
if(strcmp(cmd, "/a", true) == 0 || strcmp(cmd, "/activity", true) == 0)
 {
        new string1[128];
        tmp = strtok(cmdtext,idx);
        if(!strlen(tmp))
        {
    ...................
...........
........
There gotta be 4 spaces between each barrack and text. On opening bracket it will show like this:
pawn Код:
if(strcmp(cmd, "/a", true) == 0 || strcmp(cmd, "/activity", true) == 0)
{ // Opening bracket which means you gotta go 4 spaces till the action.
    new string[128];
When it's a closing bracket you gotta do it the reverse;
pawn Код:
SendClientMessage(playerid, COLOR_WHITE "Testing");
}
Reply
#9

ok
tnx ..
but I have new question .
Quote:

but I put the system on Server.cfg || Filerscripts
and the system dont update me on the sever..
on the dos this is load the system but the command dont work
why ? :O

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)