SA-MP Forums Archive
loose indentation warnings - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: loose indentation warnings (/showthread.php?tid=287084)



loose indentation warnings - sherlock - 01.10.2011

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;
}



Re: loose indentation warnings - Jafet_Macario - 01.10.2011

https://sampwiki.blast.hk/wiki/Errors_Li...tion_.28217.29


Re: loose indentation warnings - Kingunit - 01.10.2011

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.


Re: loose indentation warnings - sherlock - 01.10.2011

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


Re: loose indentation warnings - Kingunit - 01.10.2011

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


Re: loose indentation warnings - sherlock - 01.10.2011

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


Re: loose indentation warnings - Kingunit - 01.10.2011

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.