AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Description keeps popping up...? (https://forums.alliedmods.net/showthread.php?t=40588)

smarttart62 06-29-2006 21:29

Description keeps popping up...?
 
Well so this is my first mod, and the description keeps popping up instead of continuing the plugin...
Code:

#include <amxmodx>
#include <amxmisc>
#include <fun>

public plugin_init() {
        register_plugin("TEST MOD", "1.0", "Steve")
        register_concmd("amx_nowep","nowep",ADMIN_SLAY,"<target>")
}

public nowep(id,level,cid){
        if (!cmd_access(id,level,cid,3)){
                return PLUGIN_HANDLED
        }
       
        new Arg1[24]
        read_argv(1,Arg1,23)
        new player = cmd_target(id, Arg1, 1)
       
        if (!player)
        {
                console_print(id,"Sorry, player %s could not be found or targeted!")
                return PLUGIN_HANDLED
        }else{
                strip_user_weapons(player)
        }
       
        return PLUGIN_HANDLED
}

Help would be appreciated.
Thanks,
-Steve

smarttart62 06-29-2006 21:41

Re: Description keeps popping up...?
 
Ugh. Nevermind, fixed.
-Steve

Hawk552 06-30-2006 12:45

Re: Description keeps popping up...?
 
Just for future reference, since you're using a name, it's better to use 32 / 33 for the array size. This is because the max length of a name in HL is 32 characters, or something within 1 or 2 cells of that.

Also, you should probably make Arg1 static (use the static operator rather than new), but this really doesn't matter and will effect your script only by a marginal amount.


All times are GMT -4. The time now is 07:58.

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