AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   warning 217:loose indentation (https://forums.alliedmods.net/showthread.php?t=56945)

danielkza 06-24-2007 20:43

warning 217:loose indentation
 
I'm having some problems with this warning,i'm modifying a plugin,and when i put this:

Code:

    new cfgdir[64]
    get_configsdir(cfgdir, 63)
    server_cmd("exec %s/afk.cfg", cfgdir)

it gives me this error.if i take it out,it compiles fine.

what am i doing wrong?

Thx

hlstriker 06-24-2007 21:04

Re: warning 217:loose indentation
 
Nothing there looks wrong, maybe post more code?

kmal2t 06-24-2007 22:38

Re: warning 217:loose indentation
 
Wow...loose identification is a WARNING and the plugin will still compile and should work. Just use the amxx studio and use auto indenter and it should fix 99.9% of indention problems correctly.

crazylf2 06-24-2007 23:19

Re: warning 217:loose indentation
 
const a = 64
new cfgdir[a]


it should work

Emp` 06-25-2007 11:38

Re: warning 217:loose indentation
 
Quote:

Originally Posted by crazylf2 (Post 494357)
const a = 64
new cfgdir[a]


it should work

no...

like kmal2t said, loose indentation is only a warning and won't affect plugin performance. simple solution is to use an auto indenter. what it means though is that the number of spaces/tabs is not the correct amount from the previous line.

a simple guide to go by to never run into this is, for anytime code can be surrounded by brackets ({}) add another tab.

Code:

        if(blah)
                blah2()
        else{
                for(new i=0; i<4; i++)
                        blah3(i)
        }



All times are GMT -4. The time now is 21:30.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.