AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   undefined symbol "amxclient_cmd" (https://forums.alliedmods.net/showthread.php?t=340652)

rbasile 12-01-2022 10:36

undefined symbol "amxclient_cmd"
 
Sorry if this is a little low effort, but I'm new to this and can't find whats wrong.

I've got this little script:

PHP Code:

#include <amxmodx>
#include <amxmisc>

public cmd_votemap(idlevelcid) {
    if (!
cmd_access(idlevelcid1))
        return 
PLUGIN_CONTINUE
    
    amxclient_cmd
(id"amx_votemapmenu")
    return 
PLUGIN_CONTINUE   
}

public 
plugin_init() {
    
register_plugin("say /votemap""1""rami")
    
register_clcmd("say /votemap""cmd_votemap"0"- Shows the votemap menu")


And when I compile it with the web compiler I get:

PHP Code:

/tmp/textmWzvk1.sma(8) : error 017undefined symbol "amxclient_cmd" 

Is amxclient_cmd not part of amxmodx? The API says so[1].

[1]: <https://www.amxmodx.org/api/amxmodx/amxclient_cmd>

DruGzOG 12-01-2022 11:34

Re: undefined symbol "amxclient_cmd"
 
client_cmd

rbasile 12-01-2022 12:42

Re: undefined symbol "amxclient_cmd"
 
That was it, many thanks :)

fysiks 12-01-2022 22:43

Re: undefined symbol "amxclient_cmd"
 
Your issue is that you're using an old version of AMX Mod X. amxclient_cmd() is new in AMX Mod X 1.9.0. If you can update your server to use 1.9.0, you should prefer to use engclient_cmd() or amxclient_cmd() over client_cmd() whenever possible.


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

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