Raised This Month: $ Target: $400
 0% 

Problem with compile and update


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GmTx
BANNED
Join Date: May 2009
Location: Mountains [BG/Sofia]
Old 08-23-2009 , 15:44   Problem with compile and update
Reply With Quote #1

Can somebody update this code because it give me some errors when i compile it
The ERRORS
Code:
Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Number of arguments does not match definition on line 69
Error: Number of arguments does not match definition on line 70
Error: Number of arguments does not match definition on line 74
Error: Number of arguments does not match definition on line 79
Error: Number of arguments does not match definition on line 84
Error: Invalid expression, assumed zero on line 223
Warning: Expression has no effect on line 223
Error: Invalid expression, assumed zero on line 224
Warning: Expression has no effect on line 224
Error: Invalid expression, assumed zero on line 225
Error: Too many error messages on one line on line 225

Compilation aborted.
9 Errors.
Could not locate output file E:\Downloads\ss.amx (compile failed).
The code
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <geoip> 


#define PLUGIN "Hud Stats"
#define VERSION "1.0"
#define AUTHOR "GmTx"

new const hudstatsmenuname[] = "\rHud Stats Menu \w"

new nextmap[32
new 
name[32]
new 
ip[32]
new 
authid[32]
new 
country[46]
new 
Currenttime[9
new 
CurrentDay[16]

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /hudstats""cmdHudStatsMenu")    
    
    
set_task(5.0,"cmdShowTime")
    
set_task(5.0,"cmdShowDate")
    
set_task(5.0,"cmdShowTimeLeft")
    
set_task(5.0,"cmdShowNextMap")    
    
set_task(5.0,"cmdShowName")
    
set_task(5.0,"cmdShowIp")
    
set_task(5.0,"cmdShowAuthID")
    
set_task(5.0,"cmdShowCountry")    
}

cmdHudStatsMenu(id)
{
    new 
menu menu_create(hudstatsmenuname"hudstatsmenufunction")
    
    
menu_additem(menu"\wTime""0",0),
    
menu_additem(menu"\wDate""1",0),    
    
menu_additem(menu"\wTime Left""2"0),
    
menu_additem(menu"\wNext Map""3",0),
    
menu_additem(menu"\wName""4",0),
    
menu_additem(menu"\wIP""5",0),
    
menu_additem(menu"\wAuthID""6",0),
    
menu_additem(menu"\wCountry""7",0),    
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu);
}
public 
hudstatmenufunction(idmenuitempage)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64]
    new 
accesscallback
    menu_item_getinfo
(menuitemaccessdata5iName63callback)
    
    new 
key str_to_num(data)
    
    switch(
key)
    {
        case 
0:
        {
            
cmdShowTime(id);
            
cmdHudStatsMenu
        
}    
        case 
1:
        {
            
cmdShowDate(id);
            
cmdHudStatsMenu(id);
        }
        case 
2:
        {
            
cmdShowTimeLeft(id);
            
cmdHudStatsMenu(id);
        }
        case 
3:
        {
            
cmdShowNextMap(id);
            
cmdHudStatsMenu(id);
        }
        case 
4:
        {
            
cmdShowName(id);
            
cmdHudStatsMenu(id);
        }    
        case 
5:
        {
            
cmdShowIp(id);
            
cmdHudStatsMenu(id);
        }
        case 
6:
        {
            
cmdShowAuthID(id);
            
cmdHudStatsMenu(id);
        }
        case 
7:
        {
            
cmdShowCountry(id);
            
cmdHudStatsMenu(id);
        }    
    }
    return 
PLUGIN_HANDLED;
}

public 
cmdShowTime()
{
    
    
get_time("%H:%M:%S",Currenttime,8)
    
    
set_hudmessage(02550, -1.00.01)  
    
show_hudmessage(0"[ Time: %s ]",Currenttime)
    
    
set_task(0.9,"cmdShowTime")
    


public 
cmdShowDate()
{
    
    
get_time("%d/%m/%Y",CurrentDay,15)  
    
    
set_hudmessage(02550, -1.00.01)  
    
show_hudmessage(0"^n[ Date: %s]"CurrentDay)
    
    
set_task(0.9,"cmdShowDate")
    


public 
cmdShowTimeLeft()
{
    new 
timeleft get_timeleft()
    
    
set_hudmessage(02550, -1.00.01)  
    
show_hudmessage(0"^n^n[ Time Left: %s ]"timeleft 60timeleft 60)
    
    
set_task(0.9,"cmdShowTimeLeft")
    


public 
cmdShowNextMap()
{
    
get_cvar_string("amx_nextmap",nextmap,31)
    
    
set_hudmessage(02550, -1.00.01)  
    
show_hudmessage(0"^n^n^n[ Next Map: %s ]"nextmap)
    
    
set_task(0.9,"cmdShowNextMap")
    


public 
cmdShowName(id)
{
    
get_user_name(idname31);
    
    
set_hudmessage(02550, -1.00.01)  
    
show_hudmessage(0"^n^n^n^n[ Your Name: %s ]"name)
    
    
set_task(0.9,"cmdShowName")
    


public 
cmdShowIp(id)
{
    
get_user_ip(idip31);
    
    
set_hudmessage(02550, -1.00.01)  
    
show_hudmessage(0"^n^n^n^n^n[ Your IP: %s ]"ip)
    
    
set_task(0.9,"cmdShowIp")
    


public 
cmdShowAuthID(id)
{
    
get_user_authid(idauthid31);
    
    
set_hudmessage(02550, -1.00.01)  
    
show_hudmessage(0"^n^n^n^n^n^n[ Your AduthID: %s ]"authid)
    
    
set_task(0.9,"cmdShowAuthID")
    


public 
cmdShowCountry(id)
{
    
geoip_country(ipcountry);
    
    
set_hudmessage(02550, -1.00.01)  
    
show_hudmessage(0"^n^n^n^n^n^n^n[ You are from: %s ]"country)
    
    
set_task(0.9,"cmdShowCountry")
    


public 
get_user_countryindex 
{
    static 
ip[32], country[46];
    
get_user_ip(indexip31);
    
geoip_country(ipcountry);
    
    
// By GHW_Chronic
    
if( equal(country"error") ) {
        if( !
contain(ip"192.168.") || !contain(ip"10. ") || !contain(ip"172.") || equal(ip"127.0.0.1") )
            
country "LAN";
        
        else if( 
equal(ip"loopback") )
            
country "ListenServer User";
        
        else
            
country "ERROR";
    }
    return 
country;


public 
client_connect(id)
{
    
cmdShowTime true
    cmdShowDate 
true
    cmdShowTimeLeft 
false
    cmdShowNextMap 
false
    cmdShowName 
false
    cmdShowIp 
false
    cmdShowAuthID 
false
    cmdShowCountry 
false


Last edited by GmTx; 08-23-2009 at 15:49.
GmTx is offline
Send a message via Skype™ to GmTx
 



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 15:15.


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