Raised This Month: $ Target: $400
 0% 

warning 217:loose indentation


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 06-24-2007 , 20:43   warning 217:loose indentation
Reply With Quote #1

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
danielkza is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 06-24-2007 , 21:04   Re: warning 217:loose indentation
Reply With Quote #2

Nothing there looks wrong, maybe post more code?
hlstriker is offline
kmal2t
BANNED
Join Date: Apr 2006
Old 06-24-2007 , 22:38   Re: warning 217:loose indentation
Reply With Quote #3

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.
kmal2t is offline
crazylf2
Member
Join Date: May 2004
Old 06-24-2007 , 23:19   Re: warning 217:loose indentation
Reply With Quote #4

const a = 64
new cfgdir[a]


it should work
crazylf2 is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 06-25-2007 , 11:38   Re: warning 217:loose indentation
Reply With Quote #5

Quote:
Originally Posted by crazylf2 View Post
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)
	}
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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