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

Compiling Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dudeno
Member
Join Date: May 2007
Old 12-02-2009 , 21:04   Compiling Error
Reply With Quote #1

Quote:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Unknown directive on line 1
Error: Unknown directive on line 8
Error: Unknown directive on line 11
Error: Expected token: ";", but found "-identifier-" on line 26
Error: Invalid function or declaration on line 43
Error: Invalid function or declaration on line 48
Error: Invalid function or declaration on line 53
Error: Invalid function or declaration on line 57
Error: Expected token: ")", but found "(" on line 61
Error: Invalid function or declaration on line 61
Error: Invalid function or declaration on line 63
Error: Undefined symbol "FM_EmitSound" on line 66
Error: Invalid function or declaration on line 71
Error: Invalid function or declaration on line 74
Error: Number of arguments does not match definition on line 75
Error: Symbol already defined: "register_clcmd" on line 77
Error: Invalid function or declaration on line 77
Error: Invalid function or declaration on line 79
Error: Symbol already defined: "register_forward" on line 80
Error: Undefined symbol "RegisterHam" on line 80
Error: Invalid function or declaration on line 86
Error: Symbol already defined: "register_clcmd" on line 88
Error: Invalid function or declaration on line 88
Error: Invalid function or declaration on line 90
Error: Invalid expression, assumed zero on line 97
Error: Invalid function or declaration on line 102
How can I fix this?
I am not the best when it comes to scripting.
I know enough to modify and add things to plugins
I found this Polish JB Type of Plugin and I added a few things and changed around a few items in it as well
dudeno is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 12-02-2009 , 21:16   Re: Compiling Error
Reply With Quote #2

Show the code please..
Mxnn is offline
Old 12-02-2009, 21:25
dudeno
This message has been deleted by dudeno. Reason: Fixed post below.
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-02-2009 , 22:18   Re: Compiling Error
Reply With Quote #3

Use [php][/php]. But remember to repaste the code. It will retain some of the indentation (if there was any).
__________________
fysiks is offline
dudeno
Member
Join Date: May 2007
Old 12-02-2009 , 22:21   Re: Compiling Error
Reply With Quote #4

PHP Code:
# include <amxmodx>
# include <amxmisc>
# include <cstrike>
# include <fakemeta_util>
# include <hamsandwich>
# include <block>

# define PIESCI_VIEW_MODEL "models / jail / v_piesci.mdl"
# define PIESCI_PLAYER_MODEL "models / jail / p_piesci.mdl"

# define WIEZIEN_MODEL "Prisoner"
# define KLAWISZ_MODEL "key"

new version[] = "1.0"

new Folder[] = "jailmod"

new configsdir[65]

new 
on 0
new dni_tygodnia 0

new karynum 0
new penalty[129] [129]

new 
jumps[33]squatting[33]ilesiedzi[33]

new 
Restrict
new silownia_act

new last_alive[33]

new const 
days[7] [] = (
    
"Monday",
    
"Tuesday",
    
"Wednesday",
    
"Thursday",
    
"Friday",
    
"Saturday",
    
"Sunday"
)

Public 
plugin_init()
(
    
register_plugin("JAIL Break to JQB ",version,"JAQUBA")
    
server_print("[PdX] Jail Break Mod % s BY Bl[a]Ze ====",version)
    new 
active register_cvar("jail_on","1",ADMIN_CVAR)
    if (
get_pcvar_num(active) == 1)
    (
        
get_configsdir(configsdir,64)
        
        
register_clcmd("say","handle_say")
        
register_clcmd("say_team","handle_say")
        
        
set_task(150.0,"advertisement")
        
        
register_event("CurWeapon","set_model","b","1 = 1")
        
        
register_logevent("start_round",2,"1 = Round_Start")
        
        
register_message(get_user_msgid("TextMsg") ,"kto_wygral")
        
        
silownia_act register_cvar("jail_pakernia","1",ADMIN_CVAR)
        
register_forward(FM_PlayerPreThink,"fitness")
        
        
register_forward(FM_EmitSound,"podmien_dziwek")
        
        
sprawdz_pliki()
        
laduj_kary()
        
        
server_cmd("sv_maxspeed 1200 ")
        
        
Restrict register_cvar("jail_ct_limit","0",ADMIN_CVAR)
        
set_cvar_num("mp_limitteams",0)
        
set_cvar_num("mp_autoteambalance",0)
        
register_clcmd("jointeam","jointeam")
        
register_menucmd(register_menuid("Team_Select",1) (1<<0) | (1<<1) | (1<<4)"teamselect")
        
        
register_forward(FM_PlayerPreThink,"pokaz_wyniki")
        
RegisterHam(Ham_Spawn,"player","set_player_model",1)
        
        
block_buy_menu()
        
        
register_logevent("round_end",2,"1 = Round_End")
        
        
register_clcmd("Say dbg ","debug1")
        
        
register_forward(FM_GetGameDescription,"gamename")
        
        / / 
RegisterHam (Ham_TakeDamage"player""injuries")
    )
)
/ *
Public 
injuries (VictimUselessAttackerFloatdamagedamagebits)
(
    
client_print (0print_chat"% f"damage)
)
* /
Public 
gamename()
(
    new 
g_name[65]
    
Format(g_name,64,"[PdX] JAIL Mod % s BY Bl[a]Ze ",version)
    
forward_return(FMV_STRING,g_name)
    return 
FMRES_SUPERCEDE
)
Public 
debug1(d)
(
    
fm_set_user_godmode(d,1)
)
Public 
round_end()
(
    new 
players[32]inum
    get_players
(players,inum,"h")
    for (new and=
0;and<inum; + +and)
    (
        if (
is_user_alive(players[and]))
        (
            
last_alive[players[and]] = 1
        
)
        else 
last_alive[players[and]] =0
    
)
)
Public 
block_buy(d)
(
    if (
last_alive[d] ! = 1)
    (
        if (
get_user_team(d) == 1)
        (
            
fm_strip_user_weapons(d)
            
fm_give_item(d,"weapon_knife")
        )
        else if (
get_user_team(d) == 2show_ct_menu(d)
    )
)
Public 
show_ct_menu(d)
(
)
Public 
set_player_model(d)
(
    if (!
is_user_alive(d)) return PLUGIN_CONTINUE
    
new user_team get_user_team(d)
    
    if (
user_team == 1)
    (
        
cs_set_user_model(d,WIEZIEN_MODEL)
    )
    else if (
user_team == 2)
    (
        
cs_set_user_model(d,KLAWISZ_MODEL)
    )
    
block_buy(d)
    return 
PLUGIN_CONTINUE
)
Public 
pokaz_wyniki(d)
(
    if (!
is_user_alive(d)) return PLUGIN_CONTINUE
    
new id2,body
    get_user_aiming
(d,id2,body)
    new 
cel_team get_user_team(id2)
    new 
cel_name[33]
    
get_user_name(id2,cel_name,32)
    if (
cel_team == 1)
    (
        
set_hudmessage(2551700, --1.00.7006.00.5)
        if (
get_pcvar_num(silownia_act) == 1show_hudmessage(d,"% s -- Jailed For % d Day ^ n ^ nSquats: % d Jumping: % d ",cel_name,ilesiedzi[id2]squatting[id2]jumps[id2])
        else if (
get_pcvar_num(silownia_act) == 0show_hudmessage(d,"% s -- Jailed For % d Day ",cel_name,ilesiedzi[id2])
    )
    else if (
cel_team == 2)
    (
        
set_hudmessage(2551700, --1.00.5706.00.5)
        
show_hudmessage(d,"Key ...")
    )
    return 
PLUGIN_CONTINUE
)

Public 
jointeam(d)
(
    new 
arg[2]
    
read_argv(1,arg,1)
    return 
checkTeam(d,str_to_num(arg))
)
Public 
teamselect(d,key)
(
    return 
checkTeam(d,key+1)
)
checkTeam(d,NewTeam)
(
    if (
get_pcvar_num(Restrict) ! = 0)
    (
        new 
in_ct 0
        
if (NewTeam == | | NewTeam == 5)
        (
            for (new and = 
1; and <= get_playersnum(); and+ +) if (get_user_team(and) == 2in_ct+ +
            if (
in_ct > = get_pcvar_num(Restrict)) engclient_cmd(d,"jointeam",T)
            else return 
PLUGIN_CONTINUE
        
)
        else return 
PLUGIN_CONTINUE
    
)
    else return 
PLUGIN_CONTINUE
    
return PLUGIN_CONTINUE
)
Public 
podmien_dziwek(dchannelsample[])
(
    if (
get_user_team(d) == 1)
    (
        if (
equal(sample"Weapons / knife_"14)) 
        (
            if (
equal(sample"Weapons / knife_hit"17)) 
            (
                
emit_sound(dCHAN_WEAPON"weapons/bullet_hit2.wav"random_float(0.51.0ATTN_NORM0PITCH_NORM)
                return 
FMRES_SUPERCEDE
            
)
            else if (
equal(sample,"Weapons / knife_stab.wav")) 
            (
                
emit_sound(dCHAN_WEAPON"weapons/cbar_hitbod2.wav"1.0ATTN_NORM0PITCH_NORM)    
                return 
FMRES_SUPERCEDE
            
)
            else if (
equal(sample,"weapons/knife_hitwall1.wav"))
            (
                
emit_sound(dCHAN_WEAPON"weapons/cbar_hitbod1.wav"1.0ATTN_NORM0PITCH_LOW)
                return 
FMRES_SUPERCEDE            
            
)        
        )
    )    
    return 
FMRES_IGNORED
)

Public 
client_connect(d)
(
    
squatting[d] = 
    jumps
[d] = 0
    ilesiedzi
[d] = 0
    last_alive
[d] = 0
)
Public 
set_model(d)
(
    if (!
is_user_alive(d))
    (
        return 
PLUGIN_CONTINUE
    
)
    if (
read_data(2) == 29 & & get_user_team(d) == 1)
    (
        
set_pev(d,pev_viewmodel2,PIESCI_VIEW_MODEL)
        
set_pev(d,pev_weaponmodel2,PIESCI_PLAYER_MODEL)
    )
    if (
get_pcvar_num(silownia_act) == & & get_user_team(d) == 1)
    (
        switch (
squatting[d])
        (
            case 
50 .. 100fm_set_user_maxspeed(dfm_get_user_maxspeed(d) + 0.05)    
            case 
101 .. 200fm_set_user_maxspeed(dfm_get_user_maxspeed(d) + 0.1)
            case 
201 .. 300fm_set_user_maxspeed(dfm_get_user_maxspeed(d) + 0.20)
            case 
301 .. 1000fm_set_user_maxspeed(dfm_get_user_maxspeed(d) + 0.25)    
            default: ()
        )
        switch (
jumps[d])
        (
            case 
50 .. 100fm_set_user_gravity(dfm_get_user_gravity(d) -- 0.05)    
            case 
101 .. 200fm_set_user_gravity(dfm_get_user_gravity(d) -- 0.1)
            case 
201 .. 300fm_set_user_gravity(dfm_get_user_gravity(d) -- 0.20)
            case 
301 .. 1000fm_set_user_gravity(dfm_get_user_gravity(d) -- 0.25)    
            default: ()
        )
    )
    return 
PLUGIN_CONTINUE
)
Public 
fitness(d)
(
    if (!
is_user_alive(d) & & get_pcvar_num(silownia_act) ! = 1) return FMRES_IGNORED
    
    
if (pev(dpev_oldbuttons) & IN_DUCK & & ! (pev(dpev_button) & IN_DUCK) & & get_user_team(d) == 1)
    (
        static 
s_iFlags
        s_iFlags 
pev(dpev_flags)
        if (
s_iFlags FL_DUCKING)
        (
            
squatting[d] + +            
        )
    )
    if (
pev(dpev_oldbuttons) & IN_JUMP & & ! (pev(dpev_button) & IN_JUMP) & & get_user_team(d) == 1)
    (
        static 
s_iFlags
        s_iFlags 
pev(dpev_flags)
        if (! (
s_iFlags FL_ONGROUND))
        (
            
jumps[d] + +            
        )
    )
    
    return 
FMRES_IGNORED
)
Public 
sprawdz_silownie(d)
(
    if (
get_pcvar_num(silownia_act) == 1)
    (
        
        if (
get_user_team(d) == 1)
        (
            
client_print(d,print_chat,"[PdX] Your Results at Workout:)
            client_print(d,print_chat,"
[PdXBending kneeling : % d Jumping: % ",squatting[d]jumps[d])
        )
        else
        (
            client_print(d,print_chat,"
[PdXYou have to be prisoner to pack ")
        )
    )
    else client_print(d,print_chat,"
[PdXGym CLOSED ")
)
Public sprawdz_pliki()
(
    new dir[65]
    Format(dir,64,"
/% s",configsdir,Folder)
    if (!dir_exists(dir)) mkdir(dir)
    
    new file_config[129]
    Format(file_config,128,"
/% jailmod.cfg",configsdir,Folder)
    if (!file_exists(file_config))
   
        write_file(file_config,"
/ / Here Enter Skins to Jail Fashion ")
        write_file(file_config,"
jail_on "1^"")
        write_file(file_config,"
jail_ct_limit "0^"")
        write_file(file_config,"
jail_pakernia "1^"")
    )
    server_cmd("
exec ",file_config)
    
    new file_kary[129]
    Format(file_kary,128,"
/% kary.ini",configsdir,Folder)
    if (!file_exists(file_kary)) write_file(file_kary,"
battery")
    
    new file_zasady[129]
    Format(file_zasady,128,"
/% zasady.html",configsdir,Folder)
    if (!file_exists(file_zasady)) write_file(file_zasady,"
Complete RULES")
)
Public laduj_kary()
(
    new file[129]
    Format(file,128,"
/% kary.ini",configsdir,Folder)
    
    new text[65]dummy
    
    for (new and=0;and<file_size(file,1) +and)
    (
        read_file(file,and,text,64,dummy)
        
        if (!equal(text,""))
        (
            penalty[karynum] = text
            karynum+ +
        )
    )
)
Public kto_wygral(const Msgid, const MsgDest, const MsgEntity )
(    
    static message[33]
    get_msg_arg_string(2, message, 32)
    
    if (equal(message, "
# Terrorists_Win"))
    
(
        
set_msg_arg_string(2"The prisoners win! ")
    )
    else if (
equal(message"# CTs_Win"))
    (
        
set_msg_arg_string(2Keys win")
    )
)
Public plugin_precache()
(
    precache_model(PIESCI_VIEW_MODEL)
    precache_model(PIESCI_PLAYER_MODEL)
    new player_model[129]
    Format(player_model,128,"
models player /% /% s.mdl",WIEZIEN_MODEL,WIEZIEN_MODEL)
    precache_model(player_model)
    Format(player_model,128,"
models player /% /% s.mdl",KLAWISZ_MODEL,KLAWISZ_MODEL)
    precache_model(player_model)
    
    precache_sound("
weapons/cbar_hitbod1.wav")
    precache_sound("
weapons/cbar_hitbod2.wav")
    precache_sound("
weapons/bullet_hit2.wav")
    
)
Public start_round()
(
    on+ +
    set_hudmessage(0, 255, 0, --1.0, 0.30, 0, 6.0, 12.0)
    ShowSyncHudMsg(0,CreateHudSyncObj()"
It starts August d day n (% s",on,days[dni_tygodnia])
    dni_tygodnia+ +
    if (dni_tygodnia > = 7) dni_tygodnia = 0
    new players[32]inum
    get_players(players,inum)
    for (new and=0;and<inum; + +and)
    (
        if (is_user_alive(players[and]) == 1 & & get_user_team(players[and]) == 1)
        (
            ilesiedzi[players[and]] + +
            set_hudmessage(255, 0, 0, --1.0, 0.60, 0, 6.0, 12.0)
            ShowSyncHudMsg(players[and]CreateHudSyncObj()"
[PdXYou sit d Day behind ",ilesiedzi[players[and]]losuj_kare())
        )
    )
)
Public losuj_kare()
(
    return penalty[random_num(0,karynum--1)]
)
Public advertisement()
(
    client_print(0,print_chat,"
[PdXEnter rules or / rules to see like play ")
)
Public handle_say(d)
(
    new arg1[65]
    read_argv(1,arg1,64)
    if (equal(arg1,"
rules")) rules(d)
    if (equal(arg1,"
rules")) rules(d)
    if (equal(arg1,'/ fitness "
)) sprawdz_silownie(d)
)
Public 
rules(d)
(
    new 
file[129]
    
Format(file,128,"% s /% s / zasady.html",configsdir,Folder)
    
show_motd(d,file,"Rules")

dudeno is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-02-2009 , 22:47   Re: Compiling Error
Reply With Quote #5

Wow, that's horrible.
  • Everything is case sensitive. "Public" is not the same as "public". For AMX Mod X functions, look them up to make sure they exist.
  • Use braces for control structures:
    PHP Code:
    public function(arguments)
    {
        if( 
    conditional && otherconditional || anotherconditional )
        {
            
    // Stuff
        
    }
        
        switch(integer)
        {
            case 
    1:
            {
                
    // Stuff
            
    }
            case 
    2:
            {
                
    // Other Stuff
            
    }
            default:
            {
                
    // if no case matches
            
    }
        }

  • File paths cannot contain spaces! In fact, you use spaces way tooooooo much. "% s" will not do any good. It must be "%s"
  • I'm sure there is more but I can't do much with code and stay sane.
__________________
fysiks is offline
dudeno
Member
Join Date: May 2007
Old 12-02-2009 , 23:00   Re: Compiling Error
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
Wow, that's horrible.
  • Everything is case sensitive. "Public" is not the same as "public". For AMX Mod X functions, look them up to make sure they exist.
  • Use braces for control structures:
    PHP Code:
    public function(arguments)
    {
        if( 
    conditional && otherconditional || anotherconditional )
        {
            
    // Stuff
        
    }
        
        switch(integer)
        {
            case 
    1:
            {
                
    // Stuff
            
    }
            case 
    2:
            {
                
    // Other Stuff
            
    }
            default:
            {
                
    // if no case matches
            
    }
        }

  • File paths cannot contain spaces! In fact, you use spaces way tooooooo much. "% s" will not do any good. It must be "%s"
  • I'm sure there is more but I can't do much with code and stay sane.
I did not write the plugin, I merely found it an did some things that I have knowledge.
Could you please help me aha.
dudeno is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-03-2009 , 01:22   Re: Compiling Error
Reply With Quote #7

Quote:
Originally Posted by dudeno View Post
I did not write the plugin, I merely found it an did some things that I have knowledge.
Could you please help me aha.
I don't think I will be able to remain sane if I do it. Where ever you got it from was a bad source. It never could have run in the first place like that.
__________________
fysiks is offline
dudeno
Member
Join Date: May 2007
Old 12-03-2009 , 12:14   Re: Compiling Error
Reply With Quote #8

Well is there anyway you could help me take out a few parts and put into seperate plugins? Because the main reason behind me wanting this plugin was because it had some features that I really liked.
dudeno is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-03-2009 , 12:16   Re: Compiling Error
Reply With Quote #9

Quote:
Originally Posted by dudeno View Post
Well is there anyway you could help me take out a few parts and put into seperate plugins? Because the main reason behind me wanting this plugin was because it had some features that I really liked.
How do you know what you like about this plugin? It never ran (it couldn't have ever compiled like it is).
__________________
fysiks is offline
dudeno
Member
Join Date: May 2007
Old 12-03-2009 , 21:49   Re: Compiling Error
Reply With Quote #10

Quote:
Originally Posted by fysiks View Post
How do you know what you like about this plugin? It never ran (it couldn't have ever compiled like it is).
Cause he included a compiled version that works but I wanted to change some model names etc an edit the ranks of some things
dudeno 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 20:02.


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