AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Compile warnings (https://forums.alliedmods.net/showthread.php?t=11829)

amxxsean 03-29-2005 11:23

Compile warnings
 
1 Attachment(s)
I just made my second script (untested) and it compiles successfully but gives me some errors. The picture of the error is attached to this post and heres the code.
Code:
#include <amxmodx> public plugin_init() {     register_plugin("kickslay","0.2","amxxsean")     register_concmd("amx_kill","do_kill",ADMIN_KICK," user slays the specified user")     register_concmd("amx_boot","do_boot",ADMIN_KICK," user boots the specified user") } public do_kill(id) {     if (!(get_user_flags(id)&ADMIN_KICK)) {         console_print(id,"[AMXX] You do not have access to this command")         return PLUGIN_HANDLED     }     if (read_argc() == 0) {         console_print(id,"[AMXX] You must select a user to slay")         return PLUGIN_HANDLED     }     new user[32], uid     read_argv(1,user,32)     uid = find_player("bh",user)     if (uid == 0) {         console_print(id,"[AMXX] No such user")         return PLUGIN_HANDLED     }     client_cmd(uid,"kill")     client_print(uid,print_chat,"[AMXX] You have been slain by an admin!")     console_print(id,"[AMXX]Player was slain!")         return PLUGIN_HANDLED         }         public do_boot(id) {         if (!(get_user_flags(id)&ADMIN_KICK)) {         console_print(id,"[AMXX] You do not have access to this command")         return PLUGIN_HANDLED         }         if (read_argc() == 0) {         console_print(id,"[AMXX] You must select a user to boot")         return PLUGIN_HANDLED     }         new userboot[32], usid         read_argv(1,userboot,32)         usid = find_player("bh",userboot)         if (usid == 0) {             console_print(id,"[AMXX] No such user")         return PLUGIN_HANDLED         }         client_cmd(usid,"say","IMGAY!BUHBYENOW!")         client_cmd(usid,"disconnect")         console_print(usid,"[AMXX] ADMIN JUST BOOTED YOUR ASS!")         console_print(id,"[AMXX] User booted from server")         return PLUGIN_HANDLED     }

Dont try to steal my super cool kickslay script! :roll:

Belsebub 03-29-2005 11:25

Code:
 #include <amxmodx>  public plugin_init() {     register_plugin("kickslay","0.2","amxxsean")     register_concmd("amx_kill","do_kill",ADMIN_KICK," user slays the specified user")     register_concmd("amx_boot","do_boot",ADMIN_KICK," user boots the specified user")  }  public do_kill(id) {     if (!(get_user_flags(id)&ADMIN_KICK)) {         console_print(id,"[AMXX] You do not have access to this command")         return PLUGIN_HANDLED     }     if (read_argc() == 0) {         console_print(id,"[AMXX] You must select a user to slay")         return PLUGIN_HANDLED     }     new user[32], uid     read_argv(1,user,32)     uid = find_player("bh",user)     if (uid == 0) {         console_print(id,"[AMXX] No such user")         return PLUGIN_HANDLED     }     client_cmd(uid,"kill")     client_print(uid,print_chat,"[AMXX] You have been slain by an admin!")     console_print(id,"[AMXX]Player was slain!")     return PLUGIN_HANDLED  }  public do_boot(id) {     if (!(get_user_flags(id)&ADMIN_KICK)) {         console_print(id,"[AMXX] You do not have access to this command")         return PLUGIN_HANDLED     }     if (read_argc() == 0) {         console_print(id,"[AMXX] You must select a user to boot")         return PLUGIN_HANDLED     }     new userboot[32], usid     read_argv(1,userboot,32)     usid = find_player("bh",userboot)     if (usid == 0) {         console_print(id,"[AMXX] No such user")         return PLUGIN_HANDLED     }     client_cmd(usid,"say","IMGAY!BUHBYENOW!")     client_cmd(usid,"disconnect")     console_print(usid,"[AMXX] ADMIN JUST BOOTED YOUR ASS!")     console_print(id,"[AMXX] User booted from server")     return PLUGIN_HANDLED  }

amxxsean 03-29-2005 11:29

Thanks. :D

Belsebub 03-29-2005 11:36

i used avalanche's auto indenter

nightscreem 03-29-2005 11:40

warnings are not bad sometimes they are to hard to fix just
try if it works

amxxsean 03-29-2005 11:41

Really? I'm using crimson editor, is his auto indenter a seperate program?
[EDIT] It works fine but did I do something incorrect with the say command? The user doesn't say "IMGAYBUHBYENOW!" when they get kicked. :?

nightscreem 03-29-2005 11:45

when should it say that

amxxsean 03-29-2005 11:47

Right before the user disconnects from a kick.
(anyone on the server should see this message)


All times are GMT -4. The time now is 09:49.

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