loose indentation warnings
#1

I get these when i add createobjects under ongamemodeinit and at other times. It doesnt seem to effect the script,but its kinda annoying. How do i stop a loose indentation in

1.Createobjects under ongamemodeinit
and
2. At the end of this script-

pawn Код:
case 7:SendClientMessageToAll(COLOR_LIGHTBLUE, "(SD INFO)Sheriff elections are held monthly on the forum");
    }
     return 1;
}
Reply
#2

https://sampwiki.blast.hk/wiki/Errors_Li...tion_.28217.29
Reply
#3

pawn Код:
case 7:SendClientMessageToAll(COLOR_LIGHTBLUE, "(SD INFO)Sheriff elections are held monthly on the forum");
    }
    return 1;
}
Probably that. Otherwise post your whole code and I will fix it.
Reply
#4

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
pawn Код:
case 7:SendClientMessageToAll(COLOR_LIGHTBLUE, "(SD INFO)Sheriff elections are held monthly on the forum");
    }
    return 1;
}
Probably that. Otherwise post your whole code and I will fix it.
I know thats what causing it,but i was wondering how to fix it. Thanks for the wiki link. even though it hasnt really helped..
edit: thanks fixed it with #pragma tabsize 0
Reply
#5

Solution you need to indent your code correct to avoid that error. So like this:
pawn Код:
CMD:hi(playerid, params[])
{
        SendClientMessage(playerid, 0xFFFFFFFF, "Hello this is a test");
                return 1;
}

// Example above is wrong.

CMD:hi(playerid, params[])
{
    SendClientMessage(playerid, 0xFFFFFFFF, "Hello this is a test");
    return 1;
}

// Example above is correct.
It's about using the tabs correct. Goodluck
Reply
#6

Thanks i used #pragma tabsize 0 and it compiled fine but now i see what the problem is thanks man
Reply
#7

Quote:
Originally Posted by sherlock
Посмотреть сообщение
Thanks i used #pragma tabsize 0 and it compiled fine but now i see what the problem is thanks man
Don't use that. It's a bad way to avoid the error. Learn how to avoid it with using tabs.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)