Raised This Month: $ Target: $400
 0% 

loose identation agen.....


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 04-27-2005 , 15:32   loose identation agen.....
Reply With Quote #1

damn, i cant get i right

can some one help with thit these warnings?

i have try a lot now, but still 3 warnings...
Code:
votekickbanmenu13.sma(64) : warning 217: loose indentation
votekickbanmenu13.sma(68) : warning 217: loose indentation
votekickbanmenu13.sma(143) : warning 217: loose indentation
Attached Files
File Type: sma Get Plugin or Get Source (votekickbanmenu13.sma - 751 views - 4.6 KB)
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 04-27-2005 , 16:20  
Reply With Quote #2

try http://www.avalanche.epherion.com/indenter/
__________________
- Bye bye!
nightscreem is offline
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 04-28-2005 , 16:30  
Reply With Quote #3

i get:

Unexpected indentation error on line 177 of your file.

The error is probably not on that line. Possibly braces or
multi-line comments inside of strings are disrupting this script.
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-28-2005 , 16:58  
Reply With Quote #4

Code:
 Your Code public cmdVoteMenu( id, lvl, cid ) {     if( cmd_access( id, lvl, cid, 0 ) )             g_iMenuOption[id] = 0         g_iMenuSettings[id] = 0         showVoteMenu( id, g_iMenuPosition = 0 )         return PLUGIN_HANDLED }

This is the same thing you did on your last one..

Code:
 This fixes two of the loose indentation public cmdVoteMenu( id, lvl, cid ) {     if( cmd_access( id, lvl, cid, 0 ) )     {         g_iMenuOption[id] = 0         g_iMenuSettings[id] = 0         showVoteMenu( id, g_iMenuPosition = 0 )     }     return PLUGIN_HANDLED }

You need to learn to when to put in { } during if statements.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 04-28-2005 , 17:11  
Reply With Quote #5

thx, but the one on line 143?

Code:
public actionVoteMenu( id, key ) {     switch( key )     {         case 7: {   //The switch key             ++g_iMenuOption[id]             g_iMenuOption[id] %= 2             switch(g_iMenuOption[id]){             case 0: g_iMenuSettings[id] = 0    //kick             case 1: g_iMenuSettings[id] = 1    //ban             }             showVoteMenu( id, g_iMenuPosition ) //143         }         case 8: showVoteMenu( id, ++g_iMenuPosition ) // More Option         case 9: showVoteMenu( id, --g_iMenuPosition ) // Back Option         // Chose a Player         default:         .........         {
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-28-2005 , 17:28  
Reply With Quote #6

I suggest you use one of these programs

www.crimsoneditor.com or the one posted on this forum. http://forums.alliedmods.net/showthread.php?t=12835

Use Tab Spacing indentation.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 04-28-2005 , 17:32  
Reply With Quote #7

well, i got i right now. testing it tomorrow.

I'm using Crimson editor, but i havnt found a tab spce indicator, ill try to find it....
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-28-2005 , 20:36  
Reply With Quote #8

What i mean by use Tab indentation, don't use certain amount of spaces to tab it, use the Tab Button on your keyboard.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 04-28-2005 , 22:35  
Reply With Quote #9

Code:
        case 7: {   //The switch key             ++g_iMenuOption[id]             g_iMenuOption[id] %= 2             switch(g_iMenuOption[id]){             case 0: g_iMenuSettings[id] = 0    //kick             case 1: g_iMenuSettings[id] = 1    //ban             } //This should not be here, get rid of it         showVoteMenu( id, g_iMenuPosition ) // This is techically outside of the case 7: block         }
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 04-29-2005 , 06:53  
Reply With Quote #10

this worked to:

Code:
public actionVoteMenu( id, key ) {     switch( key )     {         case 7: {   //The switch key             ++g_iMenuOption[id]             g_iMenuOption[id] %= 2             switch(g_iMenuOption[id]){             case 0: g_iMenuSettings[id] = 0    //kick             case 1: g_iMenuSettings[id] = 1    //ban             }                   showVoteMenu( id, g_iMenuPosition ) //just added 4 spaces         }         case 8: showVoteMenu( id, ++g_iMenuPosition ) // More Option         case 9: showVoteMenu( id, --g_iMenuPosition ) // Back Option         // Chose a Player         default:         .........         {
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
Reply


Thread Tools
Display Modes

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 16:38.


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