Page 1 of 1

warning 217: loose indentation.

Posted: 27 Jan 2018, 01:35
by Obada
Hello,

May i know why i got this warning?
warning 217: loose indentation.
I just replace this

Code: Select all

//	set_hudmessage(255, 255, 0, -1.0, 0.21, 1, 2.0, 2.0)
//	ShowSyncHudMsg(0, g_iReleaseNotice, "%L", LANG_PLAYER, "ZOMBIE_RELEASE", g_iCountDown)
By this:

Code: Select all

client_print(0, print_center, "%L", LANG_PLAYER, "ZOMBIE_RELEASE", g_iCountDown, g_iReleaseNotice)
In ze_core.sma

Thanks in advance.

Re: warning 217: loose indentation.

Posted: 27 Jan 2018, 09:35
by ArminC
Give me the full plugin "as it is" (at least that pice of code) in a pastebin/code format to fix it :)

Re: warning 217: loose indentation.

Posted: 27 Jan 2018, 10:56
by Obada
ArminC wrote:
1 Year Ago
Give me the full plugin "as it is" (at least that pice of code) in a pastebin/code format to fix it :)
I found the solution, it's because the code is unreadable, so i sort it and arrange it.

By the way, this is not difference from current ze_core.sma

Re: [Solved] warning 217: loose indentation.

Posted: 27 Jan 2018, 11:28
by ArminC
Yeah, next time if you can't get it use AMXX Studio auto-ident feature :)

Re: [Solved] warning 217: loose indentation.

Posted: 27 Jan 2018, 12:14
by Raheem
You should follow one indentation style in your code and what indent mean is spaces you leave for example:
  • Code: Select all

    if (is_user_alive)
    {
      Anything // Two spaces
    }
  • Code: Select all

    if (is_user_alive)
    {
        Anything // Four spaces
    }
Moreover this warning won't affect your code and compiler will still understand your code and will compile it to binaries. It's advised to code in good program like NotePad++ or AMXX Studio personally i always use Notepad++.