AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Compiling Errors for my plugin. (https://forums.alliedmods.net/showthread.php?t=20329)

Jordan 11-06-2005 13:40

Compiling Errors for my plugin.
 
Please help :)
I narrowed my compiling errors down from about 22 to 10, but I don't know how to fix these :(.

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <fun> #define PLUGIN "Blank Time" #define VERSION "1.0" #define AUTHOR "SatanWoJ, with help from Peli, and EKS" /*This plugin gives blanks to ALL players for the time set for the CVAR mp_blanktime. When that CVAR is up, players are able to shoot. This is part of a spawn prevention plugin. Thanks to: EKS for most of the blank CVAR coding. Peli for most of the time coding. BAILOPAN/AMXx crew for their great coding guide. THANKS A LOT GUYS!*/     new cid     new cmd_blanks     new level public plugin_init() {     register_concmd("amx_blanks","cmd_blanks",ADMIN_KICK, "0,1,")     register_concmd("amx_blanktime","cmd_blanktime",ADMIN_KICK,"1,2,3,4,5,")     register_concmd("amx_blankmessages","cmd_blankmessages",ADMIN_KICK,"0,1,")     register_plugin("Blank Spawn Prevention","1.0.","SatanWoJ")     register_cvar("mp_blanks","1")     register_cvar("mp_blanktime","5")     register_cvar("mp_messages","1") } //---------------------------------------------------------------// public client_putinserver(id) {     new arg[4]     new id = get_user_ip     new VictimID = cmd_target(id,arg,3)     read_argv(1, arg, 3)     if (get_cvar_num("mp_blanks") > "0",) }     {     set_user_hitzones(VictimID, 0, "0",)     } else {     set_user_hitzones(VictimID, 0, "255,") } //---------------------------------------------------------------// public cmd_blanks() {     if(!cmd_access(id, level, cid,2)) } {         new arg_str[3]     read_argv(1, arg_str, 3)     new arg = str_to_num(arg_str)     if(arg > 10 || arg < 1) {     client_print(id, print_chat, "You have turned blanks on.")     return PLUGIN_HANDLED }     else if (arg > 0 || arg < 11) {     set_cvar_num("mp_blanktime", arg)     client_print(id, print_chat, "You have set the Blank Time to %d second(s)", arg)     return PLUGIN_CONTINUE } //---------------------------------------------------------------// public blanks_on(id) {     if(get_cvar_num("mp_blanks") == 1)    {     set_task(0.1, "blanks", id)    }     return PLUGIN_CONTINUE } public blanks(id) {     new Float:blanktime = get_cvar_float("mp_blanktime")     new Blanks = get_cvar_num("mp_blanktime")     new Messages=get_cvar_num("mp_messages")     if(get_cvar_num("mp_messages") == 1)    {     set_hudmessage(255, 1, 1, -1.0, -1.0, 0, 6.0, BlankTime, 0.1, 0.2, 4,)     show_hudmessage(id, "Blanks are now enabled for %d seconds", Blanks)    }     set_task(cmd_blanks, "blank_off", id,)     return PLUGIN_HANDLED } //---------------------------------------------------------------// public blank_off(id) {     if(!is_user_connected(id)) {     return PLUGIN_HANDLED }     else {     set_user_hitzones(id, 255)     return PLUGIN_HANDLED }     return PLUGIN_HANDLED, }

Jordan 11-06-2005 13:45

Ignore this specific post :P

Hawk552 11-06-2005 13:46

Try this:

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <fun> #define PLUGIN "Blank Time" #define VERSION "1.0" #define AUTHOR "SatanWoJ, with help from Peli, and EKS" /*This plugin gives blanks to ALL players for the time set for the CVAR mp_blanktime. When that CVAR is up, players are able to shoot. This is part of a spawn prevention plugin. Thanks to: EKS for most of the blank CVAR coding. Peli for most of the time coding. BAILOPAN/AMXx crew for their great coding guide. THANKS A LOT GUYS!*/ public plugin_init() {     register_concmd("amx_blanks","cmd_blanks",ADMIN_KICK, "0,1,")     register_concmd("amx_blanktime","cmd_blanktime",ADMIN_KICK,"1,2,3,4,5,")     register_concmd("amx_blankmessages","cmd_blankmessages",ADMIN_KICK,"0,1,")     register_plugin("Blank Spawn Prevention","1.0.","SatanWoJ")     register_cvar("mp_blanks","1")     register_cvar("mp_blanktime","5")     register_cvar("mp_messages","1") } //---------------------------------------------------------------// public client_putinserver(id) {     new arg[4]     new VictimID = cmd_target(id,arg,3)     read_argv(1, arg, 3)     if (get_cvar_num("mp_blanks") > 0)         set_user_hitzones(VictimID, 0, 0)     else         set_user_hitzones(VictimID, 0, 255) } //---------------------------------------------------------------// public cmd_blanks(id,level,cid) {     if(!cmd_access(id, level, cid,2))         return 0;         new arg_str[3]     read_argv(1, arg_str, 3)     new arg = str_to_num(arg_str)     if(arg > 10 || arg < 1)     {         client_print(id, print_chat, "You have turned blanks on.")         return PLUGIN_HANDLED     }     else if (arg > 0 || arg < 11)     {         set_cvar_num("mp_blanktime", arg)         client_print(id, print_chat, "You have set the Blank Time to %d second(s)", arg)         return PLUGIN_CONTINUE     }         return 0; } //---------------------------------------------------------------// public blanks_on(id) {     if(get_cvar_num("mp_blanks") == 1)     {         set_task(0.1, "blanks", id)     }     return PLUGIN_CONTINUE } public blanks(id) {     new Float:blanktime = get_cvar_float("mp_blanktime")     new Float:Blanks = get_cvar_float("mp_blanktime")     if(get_cvar_num("mp_messages") == 1)     {         set_hudmessage(255, 1, 1, -1.0, -1.0, 0, 6.0, blanktime, 0.1, 0.2, 4)         show_hudmessage(id, "Blanks are now enabled for %d seconds", Blanks)     }     set_task(Blanks, "blank_off", id)     return PLUGIN_HANDLED } //---------------------------------------------------------------// public blank_off(id) {     if(!is_user_connected(id))     {         return PLUGIN_HANDLED     }     else     {         set_user_hitzones(id, 255)         return PLUGIN_HANDLED     }     return PLUGIN_HANDLED }

Jordan 11-06-2005 13:47

Thank you :oops:

How did you do that?!? <3

Zenith77 11-06-2005 13:49

he indented?

Jordan 11-06-2005 13:57

No, he fixed all my compiling errors :P


All times are GMT -4. The time now is 23:40.

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