Raised This Month: $51 Target: $400
 12% 

Loose Indenetation Warning FIX.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 03-25-2017 , 10:15   Loose Indenetation Warning FIX.
Reply With Quote #1

Hey Can some one fix this Warning? every time i add new line to plugin it make me this warning...

PHP Code:
#include < amxmodx > 
#include < amxmisc > 
#include < fakemeta > 
#include < fun > 
#include < xs > 

#define ADMIN_VIP        ADMIN_LEVEL_H 

#define TELEPORT_INTERVAL     20.0 //float 
#define TASK_REMOVEGODMODE 23131313

static const PLUGIN[ ]        = "VIP Furien"
static const 
VERSION[ ]         = "1.0"

static const 
szTag[ ]        = "[Furien-Ultimate]"

new 
Float:g_fLastUsed33 ]; 

new 
g_bNoRecoil33 ];
new 
g_bGodMode33 
new 
g_bTeleport33 
new 
g_bHpAdded33 ]

public 
plugin_init( )  

    
register_pluginPLUGINVERSION"Unhask" 
    
    
register_event"ResetHUD""SpawnPlayer""be" 
    
    
register_clcmd"say""SayChatAnswer" 
    
    
register_concmd"+teleport""CmdTeleport" 
    
register_concmd"-teleport""CmdTeleport" 
    
register_concmd"+power""CmdGodMode" 
    
register_concmd"-power""CmdGodMode" 
    
    
register_forwardFM_PlayerPreThink"fwdPlayerPreThink" )


public 
client_disconnect(id)
{
    if(
task_exists(id+TASK_REMOVEGODMODE))
        
remove_task(id+TASK_REMOVEGODMODE)
}

public 
SpawnPlayerid 

    
g_bGodModeid ] = false 
    g_bTeleport
id ] = false 
    g_bHpAdded
id ] = false 
    g_bNoRecoil
id ] = false 


public 
SayChatAnswerid 

    new 
szSaid132 
    
    
read_argsszSaidsizeof szSaid ) - 
    
remove_quotesszSaid 
    
    if ( 
containiszSaid"/vipmenu" ) ) 
    { 
        if ( 
is_user_aliveid ) && get_user_flagsid ) & ADMIN_VIP 
        { 
            
ShowMenuVIPid 
        } 
    } 


public 
ShowMenuVIPid 

    new 
szMenu 
    
    
switch ( get_user_teamid ) ) 
    { 
        case 
1
        { 
            
szMenu menu_create"\rFurien \yVIP Menu""iContent" 
            
            
menu_additemszMenu"\r1. \w255HP & 255AP",     "1" 
            
menu_additemszMenu"\r2. \wHe Grenade",     "2" 
        } 
        
        case 
2
        { 
            
szMenu menu_create"\rAnti-Furien \yVIP Menu""iContent" 
            
            
menu_additemszMenu"\r1. \w255HP & 255AP",     "1" 
            
menu_additemszMenu"\r2. \wHe Grenade",     "2" 
            
menu_additemszMenu"\r3. \wGodMode",     "3" 
            
menu_additemszMenu"\r4. \wTeleport",     "4" 
            
menu_additemszMenu"\r5. \wNoRecoil",     "5" 
        } 
    } 
    
    
menu_displayidszMenu
    
    return 



public 
iContentidszMenuItem 

    if ( 
Item == MENU_EXIT 
    { 
        
menu_destroyszMenu 
        return 

    

    
    new 
iData], szName32 
    new 
iAccessiCallback 
    
    menu_item_getinfo
szMenuItemiAccessiDatasizeof iData ) - 1szNamesizeof szName ) - 1iCallback 
    
    new 
iKeys str_to_numiData 
    
    switch( 
get_user_teamid ) ) 
    { 
        case 
1
        { 
            switch( 
iKeys 
            { 
                case 
1
                { 
                    if(!
g_bHpAdded[id]) 
                    { 
                        
set_user_healthid255 
                        
set_user_armorid255 
                        
                        
g_bHpAdded[id] = true
                        print_colorchat
id"!t%s !yYou choose !g255HP & 255AP"szTag 
                    } 
                } 
                case 
2
                { 
                    { 
                        
give_itemid"weapon_hegrenade" 
                        
print_colorchatid"!t%s !yYou choose !gHE"szTag 
                    } 
                } 
            } 
        } 
        
        case 
2
        { 
            switch( 
iKeys 
            { 
                case 
1
                { 
                    
set_user_healthid255 
                    
set_user_armorid255 
                    
                    
print_colorchatid"!t%s !yYou choose !g255HP & 255AP"szTag 
                } 
                case 
2
                { 
                    
give_itemid"weapon_hegrenade" 
                    
print_colorchatid"!t%s !yYou choose !gHE"szTag 
                } 
                
                case 
3
                { 
                    if(!
g_bGodMode[id])
                    {
                        
g_bGodModeid ]  = true 
                        
                        client_cmd
id"bind b ^"+power^"" 
                        
                        
print_colorchatid"!t%s !yYou choose !gGodMode"szTag )
                        
print_colorchatid"!t%s !yBind [B] to use !gGodMode"szTag 
                    }
                } 
                
                case 
4
                { 
                    if(!
g_bTeleport[id])
                    {
                        
g_bTeleportid ]  = true 
                        
                        client_cmd
id"bind v ^"+teleport^"" 
                        
                        
print_colorchatid"!t%s !yYou choose !gTeleport"szTag 
                        
print_colorchatid"!t%s !yBind [V] to use !gTeleport"szTag 
                    }
                }
                                
                case 
5:
                {
                    
g_bNoRecoilid ]  = true;
                    
                    
print_colorchatid"!t%s !yYou choose !gNoRecoil"szTag 
                } 
            } 
        } 
    }
    return 

    


public 
RemoveGodM(id)
{
    
id -= TASK_REMOVEGODMODE
    
    g_bGodMode
[id] = false
    set_pev
(id,pev_takedamage,DAMAGE_AIM)
}
public 
CmdGodModeid 

    if( !
is_user_aliveid ) || !g_bTeleportid ] ) 
        return 
PLUGIN_HANDLED 
        
        set_pev
(id,pev_takedamage,DAMAGE_NO)
        
set_task(20.0,"RemoveGodM",id+TASK_REMOVEGODMODE)
    
    return 
PLUGIN_HANDLED 
}

public 
CmdTeleportid 

    if( !
is_user_aliveid ) || !g_bTeleportid ] ) 
        return 
PLUGIN_HANDLED 
    
    
    
static Float:fTime 
    
    fTime 
get_gametime( ) 
    
    if( 
g_fLastUsedid ] > 0.0 && ( fTime g_fLastUsedid ] ) < TELEPORT_INTERVAL 
    { 
        
        
print_colorchatid"!t%s !yYou can use teleport once in !g%i !yseconds!"szTagfloatroundTELEPORT_INTERVAL ) )
        return 
PLUGIN_HANDLED 
    
}    
    
    static 
Float:start], Float:dest
    
    
pev(idpev_originstart
    
pev(idpev_view_ofsdest
    
xs_vec_add(startdeststart
    
pev(idpev_v_angledest
    
    
engfunc(EngFunc_MakeVectorsdest
    
global_get(glb_v_forwarddest
    
xs_vec_mul_scalar(dest9999.0dest
    
xs_vec_add(startdestdest
    
engfunc(EngFunc_TraceLinestartdestIGNORE_MONSTERSid0
    
get_tr2(0TR_vecEndPosstart
    
get_tr2(0TR_vecPlaneNormaldest
    
    static const 
player_hull[] = {HULL_HUMANHULL_HEAD
    
engfunc(EngFunc_TraceHullstartstartDONT_IGNORE_MONSTERSplayer_hull[_:!!(pev(idpev_flags) & FL_DUCKING)], id0
    
    if ( !
get_tr2(0TR_StartSolid) && !get_tr2(0TR_AllSolid) &&  get_tr2(0TR_InOpen)) 
    { 
        
engfunc(EngFunc_SetOriginidstart
        return 
PLUGIN_HANDLED 
    

    
    static 
Float:size[3
    
pev(idpev_sizesize
    
    
xs_vec_mul_scalar(dest, (size[0] + size[1]) / 2.0dest
    
xs_vec_add(startdestdest
    
engfunc(EngFunc_SetOriginiddest
    
    
    
    
g_fLastUsed[id] = fTime 
    
    
return PLUGIN_HANDLED 


public 
fwdPlayerPreThinkid 

    if( !
is_user_aliveid ) && !g_bNoRecoilid ] ) 
        return 
1
        
    if ( 
get_user_flagsid ) & ADMIN_VIP 
    { 
        
set_pevidpev_punchangle, { 0.0,0.0,0.0 } ); 
    } 
    
    return 
0


stock print_colorchat(const id, const input[], any:...) 

    new 
count 1players[32]; 
    static 
msg[191]; 
    
vformat(msg,190,input,3); 
    
replace_all(msg,190,"!g","^4");// green txt 
    
replace_all(msg,190,"!y","^1");// orange txt 
    
replace_all(msg,190,"!t","^3");// team txt 
    
replace_all(msg,190,"!w","^0");// team txt 
    
if (idplayers[0] = id; else get_players(players,count,"ch"); 
    for (new 
i=0;i<count;i++) 
        if (
is_user_connected(players[i])) 
        { 
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]); 
            
write_byte(players[i]); 
            
write_string(msg); 
            
message_end(); 
        } 

__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 03-25-2017 , 10:24   Re: Loose Indenetation Warning FIX.
Reply With Quote #2

Code:
public CmdGodMode( id )  
{  
    if( !is_user_alive( id ) || !g_bTeleport[ id ] )  
        return PLUGIN_HANDLED  
         
        set_pev(id,pev_takedamage,DAMAGE_NO) 
        set_task(20.0,"RemoveGodM",id+TASK_REMOVEGODMODE) 
     
    return PLUGIN_HANDLED  
}
->

Code:
public CmdGodMode( id )  
{  
    if( !is_user_alive( id ) || !g_bTeleport[ id ] )  
        return PLUGIN_HANDLED  
         
    set_pev(id,pev_takedamage,DAMAGE_NO) 
    set_task(20.0,"RemoveGodM",id+TASK_REMOVEGODMODE) 
     
    return PLUGIN_HANDLED  
}
also remove the second set of curly brackets from this part:
Code:
case 2:  
                {  
                    {  
                        give_item( id, "weapon_hegrenade" )  
                        print_colorchat( id, "!t%s !yYou choose !gHE", szTag )  
                    }  
                }

Last edited by jimaway; 03-25-2017 at 10:26.
jimaway is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 03-25-2017 , 10:48   Re: Loose Indenetation Warning FIX.
Reply With Quote #3

i fix 3 and other wont fix could you fix all code to me :d... and thanxx
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 03-25-2017 , 12:03   Re: Loose Indenetation Warning FIX.
Reply With Quote #4

Just paste your code in AMXX Studio and click CTRL + I.
__________________
edon1337 is offline
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 03-25-2017 , 12:11   Re: Loose Indenetation Warning FIX.
Reply With Quote #5

here :
PHP Code:
#include < amxmodx > 
#include < amxmisc > 
#include < fakemeta > 
#include < fun > 
#include < xs > 

#define ADMIN_VIP        ADMIN_LEVEL_H 

#define TELEPORT_INTERVAL     20.0 //float 
#define TASK_REMOVEGODMODE 23131313

static const PLUGIN[ ]        = "VIP Furien"
static const 
VERSION[ ]         = "1.0"

static const 
szTag[ ]        = "[Furien-Ultimate]"

new 
Float:g_fLastUsed33 ]; 

new 
g_bNoRecoil33 ];
new 
g_bGodMode33 
new 
g_bTeleport33 
new 
g_bHpAdded33 ]

public 
plugin_init( )  

    
register_pluginPLUGINVERSION"Unhask" 
    
    
register_event"ResetHUD""SpawnPlayer""be" 
    
    
register_clcmd"say""SayChatAnswer" 
    
    
register_concmd"+teleport""CmdTeleport" 
    
register_concmd"-teleport""CmdTeleport" 
    
register_concmd"+power""CmdGodMode" 
    
register_concmd"-power""CmdGodMode" 
    
    
register_forwardFM_PlayerPreThink"fwdPlayerPreThink" )


public 
client_disconnect(id)
{
    if(
task_exists(id+TASK_REMOVEGODMODE))
        
remove_task(id+TASK_REMOVEGODMODE)
}

public 
SpawnPlayerid 

    
g_bGodModeid ] = false 
    g_bTeleport
id ] = false 
    g_bHpAdded
id ] = false 
    g_bNoRecoil
id ] = false 


public 
SayChatAnswerid 

    new 
szSaid132 
    
    
read_argsszSaidsizeof szSaid ) - 
    
remove_quotesszSaid 
    
    if ( 
containiszSaid"/vipmenu" ) ) 
    { 
        if ( 
is_user_aliveid ) && get_user_flagsid ) & ADMIN_VIP 
        { 
            
ShowMenuVIPid 
        } 
    } 


public 
ShowMenuVIPid 

    new 
szMenu 
    
    
switch ( get_user_teamid ) ) 
    { 
        case 
1
        { 
            
szMenu menu_create"\rFurien \yVIP Menu""iContent" 
            
            
menu_additemszMenu"\r1. \w255HP & 255AP",     "1" 
            
menu_additemszMenu"\r2. \wHe Grenade",     "2" 
        } 
        
        case 
2
        { 
            
szMenu menu_create"\rAnti-Furien \yVIP Menu""iContent" 
            
            
menu_additemszMenu"\r1. \w255HP & 255AP",     "1" 
            
menu_additemszMenu"\r2. \wHe Grenade",     "2" 
            
menu_additemszMenu"\r3. \wGodMode",     "3" 
            
menu_additemszMenu"\r4. \wTeleport",     "4" 
            
menu_additemszMenu"\r5. \wNoRecoil",     "5" 
        } 
    } 
    
    
menu_displayidszMenu
    
    return 



public 
iContentidszMenuItem 

    if ( 
Item == MENU_EXIT 
    { 
        
menu_destroyszMenu 
        return 

    

    
    new 
iData], szName32 
    new 
iAccessiCallback 
    
    menu_item_getinfo
szMenuItemiAccessiDatasizeof iData ) - 1szNamesizeof szName ) - 1iCallback 
    
    new 
iKeys str_to_numiData 
    
    switch( 
get_user_teamid ) ) 
    { 
        case 
1
        { 
            switch( 
iKeys 
            { 
                case 
1
                { 
                    if(!
g_bHpAdded[id]) 
                    { 
                        
set_user_healthid255 
                        
set_user_armorid255 
                        
                        
g_bHpAdded[id] = true
                        print_colorchat
id"!t%s !yYou choose !g255HP & 255AP"szTag 
                    } 
                } 
                case 
2
                { 
                    
give_itemid"weapon_hegrenade" 
                    
print_colorchatid"!t%s !yYou choose !gHE"szTag 
                }
            } 
        } 
    
        case 
2
        { 
            switch( 
iKeys 
            { 
                case 
1
                { 
                    
set_user_healthid255 
                    
set_user_armorid255 
                
                    
print_colorchatid"!t%s !yYou choose !g255HP & 255AP"szTag 
                } 
                case 
2
                { 
                    
give_itemid"weapon_hegrenade" 
                    
print_colorchatid"!t%s !yYou choose !gHE"szTag 
                } 
            
                case 
3
                { 
                    if(!
g_bGodMode[id])
                    {
                        
g_bGodModeid ]  = true 
                    
                        client_cmd
id"bind b ^"+power^"" 
                    
                        
print_colorchatid"!t%s !yYou choose !gGodMode"szTag )
                        
print_colorchatid"!t%s !yBind [B] to use !gGodMode"szTag 
                    }
                } 
            
                case 
4
                { 
                    if(!
g_bTeleport[id])
                    {
                        
g_bTeleportid ]  = true 
                    
                        client_cmd
id"bind v ^"+teleport^"" 
                    
                        
print_colorchatid"!t%s !yYou choose !gTeleport"szTag 
                        
print_colorchatid"!t%s !yBind [V] to use !gTeleport"szTag 
                    }
                }
            
                case 
5:
                {
                    
g_bNoRecoilid ]  = true;
                
                    
print_colorchatid"!t%s !yYou choose !gNoRecoil"szTag 
                } 
            } 
        } 
    }
    return 
0


public 
RemoveGodM(id)
{
    
id -= TASK_REMOVEGODMODE

    g_bGodMode
[id] = false
    set_pev
(id,pev_takedamage,DAMAGE_AIM)
}
public 
CmdGodModeid 

    if( !
is_user_aliveid ) || !g_bTeleportid ] ) 
    return 
PLUGIN_HANDLED 
    
    set_pev
(id,pev_takedamage,DAMAGE_NO)
    
set_task(20.0,"RemoveGodM",id+TASK_REMOVEGODMODE)
    
    return 
PLUGIN_HANDLED 
}

public 
CmdTeleportid 

    if( !
is_user_aliveid ) || !g_bTeleportid ] ) 
        return 
PLUGIN_HANDLED 
    
    
    
static Float:fTime 
    
    fTime 
get_gametime( ) 
    
    if( 
g_fLastUsedid ] > 0.0 && ( fTime g_fLastUsedid ] ) < TELEPORT_INTERVAL 
    { 
        
        
print_colorchatid"!t%s !yYou can use teleport once in !g%i !yseconds!"szTagfloatroundTELEPORT_INTERVAL ) )
        return 
PLUGIN_HANDLED 
    
}    
    
    static 
Float:start], Float:dest
    
    
pev(idpev_originstart
    
pev(idpev_view_ofsdest
    
xs_vec_add(startdeststart
    
pev(idpev_v_angledest
    
    
engfunc(EngFunc_MakeVectorsdest
    
global_get(glb_v_forwarddest
    
xs_vec_mul_scalar(dest9999.0dest
    
xs_vec_add(startdestdest
    
engfunc(EngFunc_TraceLinestartdestIGNORE_MONSTERSid0
    
get_tr2(0TR_vecEndPosstart
    
get_tr2(0TR_vecPlaneNormaldest
    
    static const 
player_hull[] = {HULL_HUMANHULL_HEAD
    
engfunc(EngFunc_TraceHullstartstartDONT_IGNORE_MONSTERSplayer_hull[_:!!(pev(idpev_flags) & FL_DUCKING)], id0
    
    if ( !
get_tr2(0TR_StartSolid) && !get_tr2(0TR_AllSolid) &&  get_tr2(0TR_InOpen)) 
    { 
        
engfunc(EngFunc_SetOriginidstart
        return 
PLUGIN_HANDLED 
    

    
    static 
Float:size[3
    
pev(idpev_sizesize
    
    
xs_vec_mul_scalar(dest, (size[0] + size[1]) / 2.0dest
    
xs_vec_add(startdestdest
    
engfunc(EngFunc_SetOriginiddest
    
    
    
    
g_fLastUsed[id] = fTime 
    
    
return PLUGIN_HANDLED 


public 
fwdPlayerPreThinkid 

    if( !
is_user_aliveid ) && !g_bNoRecoilid ] ) 
        return 
1
    
    if ( 
get_user_flagsid ) & ADMIN_VIP 
    { 
        
set_pevidpev_punchangle, { 0.0,0.0,0.0 } ); 
    } 
    
    return 
0


stock print_colorchat(const id, const input[], any:...) 

    new 
count 1players[32]; 
    static 
msg[191]; 
    
vformat(msg,190,input,3); 
    
replace_all(msg,190,"!g","^4");// green txt 
    
replace_all(msg,190,"!y","^1");// orange txt 
    
replace_all(msg,190,"!t","^3");// team txt 
    
replace_all(msg,190,"!w","^0");// team txt 
    
if (idplayers[0] = id; else get_players(players,count,"ch"); 
    for (new 
i=0;i<count;i++) 
        if (
is_user_connected(players[i])) 
    { 
        
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]); 
        
write_byte(players[i]); 
        
write_string(msg); 
        
message_end(); 
    } 

__________________
FINISHED WORKING ON : Attack On Titan Mod (100% Done).

FB Acc : FaceBook Account.

pic: http://prntscr.com/fszkke not good quality
yas17sin is offline
Send a message via ICQ to yas17sin
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 03-26-2017 , 06:19   Re: Loose Indenetation Warning FIX.
Reply With Quote #6

The problem is most likely that you're mixing indentation using space and indentation using tab.
Automatically reindent the code using the editor of your choice (AMXX/Pawn Studio, NP++, Sublime) or change indentation style.
__________________
Black Rose 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 02:17.


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