Raised This Month: $ Target: $400
 0% 

Warnings in my plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Legend
Member
Join Date: Mar 2010
Location: Denmark
Old 03-07-2010 , 07:34   Warnings in my plugin
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <colorchat>
#include <fun>
#include <fakemeta_util>

#define PLUGIN "NadeSelector"
#define VERSION "1.1"
#define AUTHOR "Fixed"

new boolg_AlreadyUsed[33]


public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /grenades""cmdSelectItem")
    
register_clcmd("say_team /grenades""cmdSelectItem")
    
register_event"HLTV""EventNewRound""a""1=0""2=0" )
    
register_logevent("round_start"2"1=Round_Start");
    
}



public 
EventNewRound()
{
    new 
Players[32
    new 
playerCountiplayer 
    get_players
(PlayersplayerCount
    for (
i=0i<playerCounti++) 
    {    
        
player Players[i
        
g_AlreadyUsed[player] = false
    
}
}

public 
round_start(id)
{
    
ColorChat(0RED"[NadeSelector] Type /grenades to choose your grenades!");
}





public 
cmdSelectItem(id)
{
    new 
menu menu_create("\rChoose Item:""playerMenu_ShowSelectionHandler");
    
    
menu_additem(menu"\wFrostnade""1"0);
    
menu_additem(menu"\w2 Flashbangs +50 Health""2"0);
    
menu_additem(menu"\wHE grenade +75 Health""3"0);
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    if( 
get_user_team(id) == )
    if(!
g_AlreadyUsed[id])
        
menu_display(idmenu0);
    else
        
ColorChat(idRED"[NadeSelector] You already choosed a grenade this round.")
    else
    
ColorChat(idRED"[NadeSelector] You need to be a hider, to choose grenades!")
    return 
PLUGIN_CONTINUE;
    
}

public 
client_connect(idg_AlreadyUsed[id] = false
public playerMenu_ShowSelectionHandler(idmenuitem)


{
    new 
accesscallbackname[64], data[6]
    
    
menu_item_getinfomenuitemaccessdata5name63callback )
    
    new 
choice str_to_numdata )
    
    switch( 
choice )
    {
        case 
1// FrostNade
        
{
       
ColorChat(idRED"[NadeSelector] You received a FrostNade!");
            
give_itemid"weapon_smokegrenade" 
       
g_AlreadyUsed[id] = true
        
        
}
        
        case 
2// FLASH
        
{
            
give_itemid"weapon_flashbang" )
       
give_itemid"weapon_flashbang" )
       
set_user_health(id150)
            
g_AlreadyUsed[id] = true
       ColorChat
(idRED"[NadeSelector] You received 2 flashbangs and 150 health!");
        }
    case 
3// HE
    
{
    
give_itemid"weapon_hegrenade" )
    
set_user_healthid175)
    
g_AlreadyUsed[id] = true
    ColorChat
(idRED"[NadeSelector] You received 1 HE grenade and 175 health!");
    }
    
    
    }
    
    
    

Warnings:

Warning: Loose indentation on line 82 = give_item( id, "weapon_smokegrenade" )
Warning: Loose indentation on line 83 = g_AlreadyUsed[id] = true
Warning: Loose indentation on line 90 = give_item( id, "weapon_flashbang" )
Warning: Loose indentation on line 92 = g_AlreadyUsed[id] = true
Warning: Loose indentation on line 93 = ColorChat(id, RED, "[NadeSelector] You received 2 flashbangs and 150 health!");
Header size: 772 bytes
Code size: 4048 bytes
Data size: 2960 bytes
Stack/heap size: 16384 bytes; max. usage is unknown, due to recursion
Total requirements: 24164 bytes

5 Warnings.
Done.
__________________

Last edited by Legend; 03-07-2010 at 08:02.
Legend is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-07-2010 , 07:59   Re: Warnings in my plugin
Reply With Quote #2

It means you have badly indented your code. It's easy to see your code is not well aligned, because you have mixed spaces and tabs.
__________________
Arkshine is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 03-07-2010 , 13:16   Re: Warnings in my plugin
Reply With Quote #3

Use the indent tool.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-07-2010 , 13:22   Re: Warnings in my plugin
Reply With Quote #4

No, it should not.
__________________
Arkshine 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 08:43.


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