Raised This Month: $ Target: $400
 0% 

errors compiling


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
wonsae
Senior Member
Join Date: Jan 2006
Location: Behind you >:D
Old 05-03-2006 , 16:16   errors compiling
Reply With Quote #1

problem
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <fun> #include <tsfun> #include <engine> #define PLUGIN "New Plug-In" #define VERSION "beta1" #define AUTHOR "wonsae" new bool:has_headache[33] new bool:has_cold[33] new bool:has_flu[33] new oldspeed = 320 public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         set_task(1.0,"sick",0,"",0,"b" )     register_srvcmd("item_aspiren","item_aspiren")     register_srvcmd("item_needle","item_needle")     register_srvcmd("item_medicine","item_medicine")     register_concmd("amx_sick","adminsick",ADMIN_KICK,"amx_sick <name> <type>") } public client_connect(id){     has_cold[id] = false     has_flu[id] = false     has_headache[id] = false     client_cmd(id,"cl_realhud 1") } public health(id){     if(get_user_health(id) > 100){         client_print(id,print_chat,"[RealMod] You feel awesome!")     }     if(get_user_health(id) > 85){         client_print(id,print_chat,"[RealMod] You feel ok")     }     if(get_user_health(id) > 60){         client_print(id,print_chat,"[RealMod] You feel horrible")     }     if(get_user_health(id) > 45){         client_print(id,print_chat,"[RealMod] You feel like dying")     }     if(get_user_health(id) > 20){         client_print(id,print_chat,"[RealMod] You're breathing heavily and you're losing air")     }     if(get_user_health(id) > 5){         client_print(id,print_chat,"[RealMod] Your dying!")         set_task(1.0,"dying",0,"",0,"b" )     }     return PLUGIN_HANDLED } public dying(id){     new hp = get_user_health(id)     set_user_health(id,hp - 1) } public slots(id){     new clip, ammo     new slot = ts_getuserslots(id)     if(get_user_weapon(id,clip,ammo)){         client_print(id,print_chat,"[RealMod] You have %i amount of slots left",slot)     }     return PLUGIN_HANDLED } public ammo(id){     new ammo1, clip, weapon     get_user_ammo(id,weapon,clip,ammo1)     client_print(id,print_chat,"[RealMod] You have about %i ammo and %i clip left",ammo1, clip) } public sick(id){     if(has_headache[id] == false){         if(random_num(0,100)){             has_headache[id] = true         }     }     if(has_headache[id] == true){         set_user_rendering(id,kRenderFxGlowShell,255,42,0,kRenderNormal,16)         client_cmd(id,"cl_forwardspeed 250;cl_backspeed 250;cl_sidespeed 250")         client_print(id,print_chat,"[RealMod] You have a bad headache!")         return PLUGIN_HANDLED     }     if(has_cold[id] == false){         if(random_num(0,200)){             has_cold[id] = true         }     }     if(has_cold[id] == true){         set_user_rendering(id,kRenderFxGlowShell,255,42,0,kRenderNormal,16)         client_cmd(id,"cl_forwardspeed 150;cl_backspeed 150;cl_sidespeed 150")         client_print(id,print_chat,"[RealMod] You're becoming very cold!")         client_print(id,print_chat,"[RealMod] You started to get a cold! Find a doctor quickly!")         return PLUGIN_HANDLED     }     if(has_flu[id] == false){         if(random_num(0,300)){             has_flu[id] = true         }     }     if(has_flu[id] == true){         set_user_rendering(id,kRenderFxGlowShell,255,42,0,kRenderNormal,16)         client_cmd(id,"cl_forwardspeed 100;cl_backspeed 100;cl_sidespeed 100")         client_print(id,print_chat,"[RealMod] You're becoming very cold and weak")         client_print(id,print_chat,"[RealMod] You started to get a flu! Find a doctor quickly!")         return PLUGIN_HANDLED     }     return PLUGIN_CONTINUE } public client_disconnect(id){     has_cold[id] = false     has_flu[id] = false     has_headache[id] = false     set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25)     client_cmd(id,"cl_forwardspeed %i;cl_backspeed %i;cl_sidespeed %i",oldspeed,oldspeed,oldspeed) } public client_PreThink(id){     client_cmd(id,"cl_realhud 1")     return PLUGIN_CONTINUE } public item_aspiren(){     new arg[33], id     read_argv(1,arg,32)     id = str_to_num(arg)     has_headache[id] = false     set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25)     client_print(id,print_chat,"[RealMod] You feel much better now!")     client_cmd(id,"cl_forwardspeed %i;cl_backspeed %i;cl_sidespeed %i",oldspeed,oldspeed,oldspeed)     return PLUGIN_HANDLED } public item_medicine(){     new arg[33], id     read_argv(1,arg,32)     id = str_to_num(arg)     if(random_num(0,20)){         has_cold[id] = false         has_flu[id] = false         has_headache[id] = false         set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25)         client_print(id,print_chat,"[RealMod] You feel alot better now!")         client_cmd(id,"cl_forwardspeed %i;cl_backspeed %i;cl_sidespeed %i",oldspeed,oldspeed,oldspeed)     }     client_print(id,print_chat,"[RealMod] The medicine didn't do anything!")     return PLUGIN_HANDLED } public item_needle(){     new arg[33], arg2[33], id, targetid     read_argv(1,arg,32)     read_argv(2,arg2,32)     id = str_to_num(arg)     if(!is_user_alive(targetid)) return PLUGIN_HANDLED     if(is_user_connected(targetid)) return PLUGIN_HANDLED     if(random_num(0,10)){         has_cold[id] = false         has_flu[id] = false         has_headache[id] = false         set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25)         client_print(id,print_chat,"[RealMod] You feel alot better now!")         client_cmd(id,"cl_forwardspeed %i;cl_backspeed %i;cl_sidespeed %i",oldspeed,oldspeed,oldspeed)     }     client_print(id,print_chat,"[RealMod] The needle didn't do anything!")     return PLUGIN_HANDLED } public adminsick(id){     new arg[33], arg2[33], name, sickness     read_argv(1,arg,32)     read_argv(2,arg2,32)     name = str_to_num(arg)     sickness = str_to_num(arg2)     get_user_name(id,name,32)     if(!is_user_alive(name)) return PLUGIN_HANDLED     if(is_user_connected(name)) return PLUGIN_HANDLED     if(sickness[id] == cold){         has_cold[name] = true         client_print(id,print_chat,"[RealMod] You gave %s a %s",name,sickness)     }     if(sickness[id] == flu){         has_flu[name] = true         client_print(id,print_chat,"[RealMod] You gave %s a %s",name,sickness)     }     if(sickness[id] == headache){         has_headache[name] = true         client_print(id,print_chat,"[RealMod] You gave %s a %s",name,sickness)     }     return PLUGIN_HANDLED }

errors are
Code:
Welcome to the AMX Mod X 1.70-300 Compiler.
Copyright (c) 1997-2005 ITB CompuPhase, AMX Mod X Team

Error: Argument type mismatch (argument 2) on line 182
Error: Invalid subscript (not an array or too many subscripts): "sickness" on line 185
Warning: Expression has no effect on line 185
Error: Expected token: ";", but found "]" on line 185
Error: Invalid expression, assumed zero on line 185
Error: Too many error messages on one line on line 185

Compilation aborted.
5 Errors.
Could not locate output file C:\Documents and Settings\c\My Documents\Program Files\plugins\Untitled.amx (compile failed).
help please
wonsae is offline
 



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 05:06.


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