Raised This Month: $ Target: $400
 0% 

2 Warnings


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
enjoi.
Veteran Member
Join Date: Mar 2011
Old 10-03-2011 , 17:04   2 Warnings
Reply With Quote #1

How do I remove the warnings on line 25 and 28. Its both loose indenation
PHP Code:
#include <amxmodx> 

#define PLUGIN "Menu" 
#define VERSION "1.5" 
#define AUTHOR "Redux + -dINk^1d" 

public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR
    
register_clcmd("say /menu","mymenu"); 




public 
mymenu(id

    new 
MyMenu=menu_create("\wServer Menu [\rDeathrun\w]""cbMyMenu"); 

    
menu_additem(MyMenu"Change Server"); //item=0 
    
menu_additem(MyMenu"Deathrun Shop"); //item=1 
    
menu_additem(MyMenu"Turn off CT Visibility"); //item=2 
    
menu_additem(MyMenu"Deathrun Points"); //item=3 
    
menu_additem(MyMenu"Admin Menu", .paccess=ADMIN_BAN); //item=4 
    
menu_additem(MyMenu"Turn Off/On Round Sound"); //item=5 
    
menu_additem(MyMenu"Close"); //item=6
    

    
menu_setprop(MyMenuMPROP_EXITNAME"Close") ; 
    
menu_setprop(MyMenuMPROP_EXITMEXIT_ALL); 
    
menu_setprop(MyMenuMPROP_NUMBER_COLOR"\y"); 


    
menu_display(idMyMenu,0); 
    return 
PLUGIN_HANDLED


public 
cbMyMenu(idmenuitem

    switch(
item
    { 
        case 
0
        { 
            
client_cmd(id"say /server"); 

        } 
        case 
1
        { 
            
client_cmd(id"say /drshop"); 

        } 
        case 
2
        { 
            
client_cmd(id"say /invis"); 

        } 
        case 
3
        { 
            
client_cmd(id"say /points"); 

        } 
        case 
4
        { 
            
client_cmd(id"amxmodmenu"); 

        } 
        case 
5
        { 
            
client_cmd(id"say /roundsound"); 

        } 

    } 
    
menu_destroy(menu); 
    return 
PLUGIN_HANDLED

__________________
Block Maker v6.0 []
Point Slay v3.0 []
Contact [ PM ]
enjoi. is offline
Gooogle
Member
Join Date: Aug 2011
Old 10-03-2011 , 17:06   Re: 2 Warnings
Reply With Quote #2

Quote:
Originally Posted by enjoi. View Post
Its both loose indenation
Really? Because I compiled it and it had no errors.

Last edited by Gooogle; 10-03-2011 at 17:16.
Gooogle is offline
enjoi.
Veteran Member
Join Date: Mar 2011
Old 10-03-2011 , 17:13   Re: 2 Warnings
Reply With Quote #3

I said warnings not errors. My bad I must of had the wrong code in.
__________________
Block Maker v6.0 []
Point Slay v3.0 []
Contact [ PM ]
enjoi. is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 10-03-2011 , 17:16   Re: 2 Warnings
Reply With Quote #4

To prevent loose indentions, use only tabs or spaces to indent your code.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Stereo
Veteran Member
Join Date: Dec 2010
Old 10-03-2011 , 17:17   Re: 2 Warnings
Reply With Quote #5

loose indentation is due to the misalignment of the code:

loose indentation:

PHP Code:
give_item(id"weapon_knife")
         return 
PLUGIN_HANDLED 

no warnings:

PHP Code:
give_item(id"weapon_knife")
return 
PLUGIN_HANDLED 
Stereo is offline
codysermina
Junior Member
Join Date: Aug 2011
Location: Denmark
Old 10-04-2011 , 12:26   Re: 2 Warnings
Reply With Quote #6

Quote:
How do I remove the warnings on line 25 and 28. Its both loose indenation
- Auto Indenter! -
codysermina is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 10-04-2011 , 12:55   Re: 2 Warnings
Reply With Quote #7

AMXx Studio --> Tools --> Identer

Fixed.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 10-04-2011 , 15:19   Re: 2 Warnings
Reply With Quote #8

Lousy way to fix indentation. Not that reliable either.

Simply put:
Use ONLY one of the following; Tabs or multiple spaces. Using it consistently and not mixing them, no errors (warnings) will occur.
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
enjoi.
Veteran Member
Join Date: Mar 2011
Old 10-04-2011 , 15:30   Re: 2 Warnings
Reply With Quote #9

Ok thanks. For some reason when I copied the code I posted here into the sma it worked. Must of been something wrong idk.
__________________
Block Maker v6.0 []
Point Slay v3.0 []
Contact [ PM ]
enjoi. is offline
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 19:31.


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