Raised This Month: $ Target: $400
 0% 

Problem with plugin :/


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sm[!]l3y
Junior Member
Join Date: Nov 2007
Location: Poland
Old 11-05-2007 , 12:44   Re: Problem with plugin :/
Reply With Quote #1

Now it don't even whant to compile :/

Quote:
Your plugin failed to compile! Read the errors below:
Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/home/groups/amxmodx/tmp3/phpTao7We.sma(262) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phpTao7We.sma(540) : warning 225: unreachable code
/home/groups/amxmodx/tmp3/phpTao7We.sma(540) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phpTao7We.sma(540) : error 029: invalid expression, assumed zero
/home/groups/amxmodx/tmp3/phpTao7We.sma(540) : error 004: function "plugin_cfg" is not implemented
/home/groups/amxmodx/tmp3/phpTao7We.sma(543) : error 001: expected token: "}", but found "-end of file-"

3 Errors.
Could not locate output file /home/groups/amxmodx/public_html/websc3/phpTao7We.amx (compile failed).
.sma file is looking like this :

Code:
#include <amxmodx> #include <amxmisc> #define POLISH 0 #define KNIFFMESSAGES   4 #define HEMESSAGES   4             /* Nummer der Random Messages fuer Normal HE Kills */ #define HESMESSAGES  4             /* Nummer der Random Messages fuer Selbstmord durch HE Kills */ #define LEVELS 10 #define MESSAGESHP 4 new g_maxplayers new planter new defuser new c4timer new defusing new Float:last_omg new Float:last_plan new kills[33] = {0,...}; new deaths[33] = {0,...}; new alone_ann = 0 new levels[10] = {2, 4, 6, 8,10,12,14,16,18,20}; new stksounds[10][] = {"misc/multikill", "misc/killingspree_ultimate",                    "misc/monsterkill", "misc/rampage", "misc/ultrakill","misc/ludicrouskill",                    "misc/unstoppable_ultimate", "misc/wickedsick", "misc/godlike",                    "misc/holyshit"}; new stkmessages[10][] = {"%s: MULTI-KILL!", "%s: KILLING-SPREE!", "%s: MONSTER-KILL!",                      "%s: RAMPAGE!", "%s: ULTRA-KILL!", "%s: LUDICROUS-KILL!", "%s: UNSTOPPABLE!",                      "%s: WICKEDSICK!", "%s: GODLIKE!", "%s: HOLY SHIT!!!"}; #if POLISH new kniffmessages[KNIFFMESSAGES][] = { "%s pokroil na plasterki %s", "Doktor %s zoperowal nozem %s. ^nNiestety pacjent zmarl.", "%s wcyial scyzorykiem serce %s", "%s uzyl noza na %s"} new he_messages[HEMESSAGES][] = { "%s wyslal prezent do %s",   "%s rzucil conieco do %s",   "%s celnie rzucil w kierunku %s",   "%s zrobil duze bum dla %s"}          /* Random Messages fuer Normal HE Kills */ new hes_messages[HESMESSAGES][] = { "%s rozwalil sie za pomoca granata",   "%s dowiedzial sie co to granat",   "%s jest kamikaze",   "%s rzucil granata w swoja wlasna dupe"}                  /* Random Messages fuer Selbstmord durch HE Kills */ new messageshp[MESSAGESHP][] = {     "Cala reszta kibicuje ci zza grobu.",     "Wyglada na to, ze kumple cie zostawili...",     "Tylko tobie zycie sie nie znudzilo. Narazie...",     "Czy zauwazyles ze poluja juz tylko na ciebie?"     } #else new kniffmessages[KNIFFMESSAGES][] = { "%s pokroil na plasterki %s", "Doktor %s zoperowal nozem %s. ^nNiestety pacjent zmarl.", "%s wcyial scyzorykiem serce %s", "%s uzyl noza na %s"} new he_messages[HEMESSAGES][] = { "%s wyslal prezent do %s",   "%s rzucil conieco do %s",   "%s celnie rzucil w kierunku %s",   "%s zrobil duze bum dla %s"}          /* Random Messages for Normal HE Kills */ new hes_messages[HESMESSAGES][] = { "%s rozwalil sie za pomoca granata",   "%s dowiedzial sie co to granat",   "%s jest kamikaze",   "%s rzucil granata w swoja wlasna dupe"}                  /* Random Messages for Suicide HE Kills */ new messageshp[MESSAGESHP][] = {     "Cala reszta kibicuje ci zza grobu.",     "Wyglada na to, ze kumple cie zostawili...",     "Tylko tobie zycie sie nie znudzilo. Narazie...",     "Czy zauwazyles ze poluja juz tylko na ciebie?"     } #endif     get_streak() {     new streak[3]     get_cvar_string("streak_mode",streak,2)     return read_flags(streak) } get_bemode() {     new bemode[10]     get_cvar_string("bomb_mode",bemode,9)     return read_flags(bemode) } public death_event(id) {      new streak = get_streak()          if (!(streak&1) && !(streak&2))              return                new killer = read_data(1);          new victim = read_data(2);                deaths[victim] += 1;          kills[victim] = 0;                if(!(1 <= killer <= g_maxplayers))      return                kills[killer] += 1;          deaths[killer] = 0;          for (new i = 0; i < LEVELS; i++) {              if (kills[killer] == levels[i]) {                        announce(killer, i);                  return              }          }      } announce(killer, level) {     new streak = get_streak()     if (streak&1){     new name[32];     get_user_name(killer, name, 32);     set_hudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2);     show_hudmessage(0, stkmessages[level], name);     }     if (streak&2){     client_cmd(0, "spk %s", stksounds[level]);     } } #if POLISH public reset_hud(id) {     new streak = get_streak()     if (streak&1){     if (kills[id] > levels[0]) {         client_print(id, print_chat,                      "* Zabiles %d razy pod rzad jak narazie", kills[id]);     } else if (deaths[id] > 1) {         client_print(id, print_chat,                      "* Uwazaj! Zginales %d rund(y) pod rzad...", deaths[id]);     }     } } #else public reset_hud(id) {     new streak = get_streak()     if (streak&1){     if (kills[id] > levels[0]) {         client_print(id, print_chat,                      "* Zabiles %d razy pod rzad jak narazie", kills[id]);     } else if (deaths[id] > 1) {         client_print(id, print_chat,                      "* Uwazaj! Zginales %d rund(y) pod rzad...", deaths[id]);     }     } } #endif public client_connect(id) {     new streak = get_streak()     if ((streak&1) || (streak&2)){     kills[id] = 0;     deaths[id] = 0;     } } public got_bomb(id){     new bemode = get_bemode()     if (bemode&1){         planter = id         defuser = defusing = 0         if ((read_data(1)==2) && (last_omg < get_gametime())){             new bplayers_t[32], numte             get_players(bplayers_t,numte,"e","TERRORIST")             last_omg = get_gametime() + 15.0             new name[32]             get_user_name(planter, name , 32)             set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)             #if POLISH             show_hudmessage(bplayers_t[0],"O boze! %s dostal sie do celu!",name)             #else             show_hudmessage(bplayers_t[0],"O boze! %s dostal sie do celu!",name)             #endif         }     } } public bdef_g(id){     new bemode = get_bemode()     if (read_data(1) == 3){         if (last_plan < get_gametime()){             if (bemode&2){                 new bplayers_t[32], numte                 get_players(bplayers_t,numte,"e","TERRORIST")                 last_plan = get_gametime() + 15.0                 new name[32]                 set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)                 get_user_name(planter, name , 32)                 #if POLISH                 show_hudmessage(bplayers_t[0],"%s podklada bombe!",name)                 #else                 show_hudmessage(bplayers_t[0],"%s podklada bombe!",name)                 #endif             }         }     }     else {         defuser = defusing = id             if (last_plan < get_gametime()){             if (bemode&4){                 new bplayers_ct[32], numct                 get_players(bplayers_ct,numct,"e","CT")                 last_plan = get_gametime() + 15.0                 new name[32]                 set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)                 get_user_name(defusing, name , 32)                 #if POLISH                 show_hudmessage(bplayers_ct[0],"%s rozbraja bombe...",name)                 #else                 show_hudmessage(bplayers_ct[0],"%s rozbraja bombe...:D",name)                 #endif             }         }     } } public bdef_l(id)     defusing = 0 public disable_c4(){     c4timer = 0     last_plan = 0.0     last_omg = 0.0     remove_task(8038) } public bomb_planted(){     new bemode = get_bemode()     if (bemode&256){     client_cmd(0,"spk djeyl/c4powa")     }     if (bemode&8){         new name[32]         get_user_name(planter, name , 32)         set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)         #if POLISH         show_hudmessage(0,"%s podlozyl bombe!!!",name)         #else         show_hudmessage(0,"%s podlozyl bombe!!!",name)         #endif         c4timer = get_cvar_num("mp_c4timer") - 2         set_task(1.0,"bomb_c",8038,"",0,"b")         last_plan = 0.0     } } public bomb_c(){     new bemode = get_bemode()                 if (--c4timer > 0){                     if (c4timer == 30 || c4timer == 20){                         if (bemode&256){                             new temp[48]                             num_to_word(c4timer,temp,48)                             //client_cmd(0,"spk ^"vox/%s seconds until explosion^"",temp)                         }                     }                     else if (c4timer < 11){                         if (bemode&256){                             new temp[48]                             num_to_word(c4timer,temp,48)                             //client_cmd(0,"spk ^"vox/%s^"",temp)                         }                     }                     if (defusing)                         client_print(defusing,print_center,"%d",c4timer)                 }                 else{                     remove_task(8038)                 }             } public bomb_defused(){     new bemode = get_bemode()     if (bemode&256){     client_cmd(0,"spk djeyl/laugh")     }     if (bemode&16){         new name[32]         get_user_name(defuser, name , 32)         set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)         #if POLISH         show_hudmessage(0,"%s rozbroil bombe!",name)         #else         show_hudmessage(0,"%s rozbroil bombe!",name)                   #endif         disable_c4()     } } public bomb_failure(){     new bemode = get_bemode()     if (defuser){         if (bemode&256){         client_cmd(0,"spk djeyl/witch")         }         if (bemode&32){             new name[32]             get_user_name(defuser, name , 32)             set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)             #if POLISH             show_hudmessage(0,"%s nie zdazyl rozbroic bomby...",name)             #else             show_hudmessage(0,"%s nie zdazyl rozbroic bomby...",name)             #endif         }     } } public bomb_pickup(id){     new bemode = get_bemode()     if (bemode&64){         new bplayers_t[32], numte         get_players(bplayers_t,numte,"e","TERRORIST")         new name[32]         get_user_name(id, name , 32)         set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)         #if POLISH         show_hudmessage(bplayers_t[0],"%s podniosl bombe...",name)         #else         show_hudmessage(bplayers_t[0],"%s podniosl bombe...",name)         #endif             } } public bomb_drop(){     new bemode = get_bemode()     if (bemode&128){         new bplayers_t[32], numte         get_players(bplayers_t,numte,"e","TERRORIST")         new name[32]         get_user_name(planter, name , 32)         set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)         #if POLISH         show_hudmessage(bplayers_t[0],"%s upuscil bombe!!!",name)         #else         show_hudmessage(bplayers_t[0],"%s upuscil bombe!!!",name)         #endif     } } public he_kills(){    new killer_id = read_data(1)    new victim_id = read_data(2)    new killer_name[32], victim_name[33]        get_user_name(killer_id,killer_name,33)    get_user_name(victim_id,victim_name,33)    new hekmode[8]    get_cvar_string("hekill_mode",hekmode,8)    new hekmode_bit = read_flags(hekmode)    if (hekmode_bit & 1) {     if (victim_id != killer_id)      {     if (hekmode_bit & 4) {      client_cmd(0,"spk djeyl/grenade")     }     set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)     show_hudmessage(0,he_messages[ random_num(0,HEMESSAGES-1)],killer_name,victim_name)      }    }    if (hekmode_bit & 2) {     if (victim_id == killer_id)      {     if (hekmode_bit & 4) {      client_cmd(0,"spk djeyl/witch")     }     set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)     show_hudmessage(0,hes_messages[ random_num(0,HESMESSAGES-1) ],victim_name)      }    } } public knife_kill(){    new kniffmode[4]    get_cvar_string("kniff_mode",kniffmode,4)    new kniffmode_bit = read_flags(kniffmode)    if (kniffmode_bit & 1) {     new killer_id = read_data(1)     new victim_id = read_data(2)     new killer_name[33], victim_name[33]     get_user_name(killer_id,killer_name,33)     get_user_name(victim_id,victim_name,33)     set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)     show_hudmessage(0,kniffmessages[ random_num(0,KNIFFMESSAGES-1) ],killer_name,victim_name)    }    if (kniffmode_bit & 2) {     client_cmd(0,"spk misc/humiliation")    } } public death_msg(id){     new cts[32], ts[32], ctsnum, tsnum     get_players(cts,ctsnum,"ae","CT")         get_players(ts,tsnum,"ae","TERRORIST")     if ( ctsnum == 1 && tsnum == 1 ){         new ctname[32], tname[32]         get_user_name(cts[0],ctname,31)         get_user_name(ts[0],tname,31)         set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)         show_hudmessage(0,"%s vs. %s",ctname,tname)         client_cmd(0,"spk misc/maytheforce")         return PLUGIN_CONTINUE     }           if (alone_ann)         return PLUGIN_CONTINUE                   if ( ctsnum == 1 && tsnum > 1 )         alone_ann = cts[0]     else if ( tsnum == 1 && ctsnum > 1 )         alone_ann = ts[0]           if (alone_ann){         new name[32]         get_user_name(alone_ann,name,31)         set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)         show_hudmessage(0,"%s: %s",name, messageshp[ random_num(0,MESSAGESHP-1) ] )             client_cmd(alone_ann,"spk misc/oneandonly")     }           return PLUGIN_CONTINUE } public roundend_msg(id)     alone_ann = 0 public hs(){    new hsmode[4]    get_cvar_string("hs_mode",hsmode,4)    new hsmode_bit = read_flags(hsmode)    if (hsmode_bit & 1){       new killer_id = read_data(1)       new victim_id = read_data(2)       new victim_name[33]       get_user_name(victim_id,victim_name,33)       set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 3.0, 3.0, 0.15, 0.15, 1)       #if POLISH       show_hudmessage(killer_id,"::HEADSHOT::",victim_name)       #else       show_hudmessage(killer_id,"::HEADSHOT::",victim_name)       #endif    }    if (hsmode_bit & 2){       client_cmd(0,"spk misc/headshot.wav")    } } public plugin_precache() { precache_sound( "djeyl/c4powa.wav") precache_sound( "djeyl/laugh.wav") precache_sound( "djeyl/grenade.wav") precache_sound( "djeyl/witch.wav") precache_sound( "misc/monsterkill.wav") precache_sound( "misc/firstblood.wav") precache_sound( "misc/dominating.wav") precache_sound( "misc/doublekill.wav") precache_sound( "misc/triplekill.wav") precache_sound( "misc/rampage.wav") precache_sound( "misc/megakill.wav") precache_sound( "misc/ludicrouskill.wav") precache_sound( "misc/unstoppable.wav") precache_sound( "misc/wickedsick.wav") precache_sound( "misc/holyshit.wav") precache_sound( "misc/godlike.wav") precache_sound( "misc/headshot.wav") precache_sound( "misc/humiliation.wav") precache_sound( "misc/killingspree.wav") precache_sound( "misc/multikill.wav") precache_sound( "misc/ultrakill.wav") precache_sound( "misc/maytheforce.wav") precache_sound( "misc/oneandonly.wav") return PLUGIN_CONTINUE } public plugin_init() {    register_plugin("Ultimate sound","0.76","[email protected]")    register_event("DeathMsg","hs","a","3=1")    register_event("DeathMsg","knife_kill","a","4&kni")    register_event("DeathMsg","he_kills","a","4&gren")    register_event("StatusIcon", "got_bomb", "be", "1=1", "1=2", "2=c4")    register_event("SendAudio", "bomb_planted", "a", "2&%!MRAD_BOMBPL")    register_event("SendAudio", "bomb_defused", "a", "2&%!MRAD_BOMBDEF")    register_event("TextMsg", "bomb_failure", "a", "2&#Target_B")    register_event("BarTime", "bdef_g", "be", "1=10", "1=5","1=3")    register_event("BarTime", "bdef_l", "be", "1=0")    register_event("TextMsg", "bomb_pickup", "bc", "2&#Got_bomb")    register_event("TextMsg", "bomb_drop", "bc", "2&#Game_bomb_d")    register_event("SendAudio", "disable_c4", "a", "2&%!MRAD_terwin","2&%!MRAD_ctwin","2&%!MRAD_rounddraw")    register_event("TextMsg","disable_c4","a","2&#Game_C","2&#Game_w")    register_event("ResetHUD", "reset_hud", "b");    register_event("DeathMsg", "death_event", "a")    register_event("SendAudio","roundend_msg","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")    register_event("TextMsg","roundend_msg","a","2&#Game_C","2&#Game_w")    register_event("DeathMsg","death_msg","a")    register_cvar("lastman_mode","abc")    register_cvar("streak_mode","ab")    register_cvar("bomb_mode","abcdefghi")    register_cvar("hekill_mode","abc")    register_cvar("kniff_mode","ab")    register_cvar("hs_mode","ab")    return PLUGIN_CONTINUE public plugin_cfg() {    g_maxplayers = get_maxplayers()    }

Maybe you can repair it? I'm too stupied
__________________
[IMG]http://img444.**************/img444/1512/kopiazapasowasmil3yqp7.jpg[/IMG]

Sorry for my lame English

Last edited by Sm[!]l3y; 11-05-2007 at 12:55.
Sm[!]l3y is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-05-2007 , 12:57   Re: Problem with plugin :/
Reply With Quote #2

I guess the end of file should be :

Code:
   register_cvar("hs_mode","ab")    return PLUGIN_CONTINUE } public plugin_cfg() {    g_maxplayers = get_maxplayers() }
ConnorMcLeod is offline
Sm[!]l3y
Junior Member
Join Date: Nov 2007
Location: Poland
Old 11-05-2007 , 13:07   Re: Problem with plugin :/
Reply With Quote #3

Now everything is good. Thanks! +karma of course
__________________
[IMG]http://img444.**************/img444/1512/kopiazapasowasmil3yqp7.jpg[/IMG]

Sorry for my lame English
Sm[!]l3y 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 01:13.


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