Raised This Month: $ Target: $400
 0% 

Scripting Help Whats Wrong With my code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pupdebox
Senior Member
Join Date: Feb 2016
Location: Wakanda
Old 05-05-2016 , 13:03   Scripting Help Whats Wrong With my code
Reply With Quote #1

its giving me warning 217: loose indentation i have also added new tekrar = 1 at the beginning of plugin
Code:
	case 6: {
		if(tekrar >= 4)
		{
		tekrar = 1
		}
            switch( tekrar )
           	 	{
		case 1 : {
			client_cmd(0, "mp3 play sound/mp3/monsterx.mp3")
			tekrar += 1
			 }
		case 2 : {client_cmd(0, "mp3 play sound/mp3/heavenx.mp3")
			tekrar += 1
			  }
		case 3 : {client_cmd(0, "mp3 play sound/mp3/patliyoherkesx.mp3")
			 tekrar += 1
			 }
		        }
	        }

Last edited by pupdebox; 05-05-2016 at 13:06.
pupdebox is offline
Michael Shoe Maker
Senior Member
Join Date: Apr 2016
Old 05-05-2016 , 13:45   Re: Scripting Help Whats Wrong With my code
Reply With Quote #2

It's to do with your indentation of your code, make sure there's no spaces etc.
PHP Code:
    case 6:
    {
        if(
tekrar >= 4)
        {
            
tekrar 1
        
}
        switch( 
tekrar )
        {
            case 
:
            {
                
client_cmd(0"mp3 play sound/mp3/monsterx.mp3")
                
tekrar += 1
            
}
            case 
:
            {
                
client_cmd(0"mp3 play sound/mp3/heavenx.mp3")
                
tekrar += 1
            
}
            case 
:
            {
                
client_cmd(0"mp3 play sound/mp3/patliyoherkesx.mp3")
                
tekrar += 1
            
}
        }
    } 

Last edited by Michael Shoe Maker; 05-05-2016 at 13:46.
Michael Shoe Maker is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 05-05-2016 , 13:58   Re: Scripting Help Whats Wrong With my code
Reply With Quote #3

Quote:
Originally Posted by pupdebox View Post
its giving me warning 217: loose indentation i have also added new tekrar = 1 at the beginning of plugin
Code:
	case 6: {
		if(tekrar >= 4)
		{
		tekrar = 1
		}
            switch( tekrar )
           	 	{
		case 1 : {
			client_cmd(0, "mp3 play sound/mp3/monsterx.mp3")
			tekrar += 1
			 }
		case 2 : {client_cmd(0, "mp3 play sound/mp3/heavenx.mp3")
			tekrar += 1
			  }
		case 3 : {client_cmd(0, "mp3 play sound/mp3/patliyoherkesx.mp3")
			 tekrar += 1
			 }
		        }
	        }

It doesnt affect your code. This is not an error , but if you feel unconfortable you use indenter tool from amxx studio.
siriusmd99 is offline
pupdebox
Senior Member
Join Date: Feb 2016
Location: Wakanda
Old 05-05-2016 , 14:11   Re: Scripting Help Whats Wrong With my code
Reply With Quote #4

Thx man im newbie and i use notepad i will download studio now
pupdebox is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-05-2016 , 20:29   Re: Scripting Help Whats Wrong With my code
Reply With Quote #5

Quote:
Originally Posted by pupdebox View Post
Thx man im newbie and i use notepad i will download studio now
I'd recommend against AMXX Studio. It has bugs. I'd recommend Notepad++ or other mature source code editor.

If you learn how to properly indent code, you'll never need a program to do it for you. However, if you really do need to do it (in Notepad++), you can use the TextFX (TextFX Edit > Reindent C++ code) plugin.
__________________

Last edited by fysiks; 05-05-2016 at 20:30.
fysiks is offline
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 18:40.


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