Ulysses

General => Developers Corner => Topic started by: Boxama on February 09, 2014, 05:04:31 AM

Title: Commands from addon not loading on server
Post by: Boxama on February 09, 2014, 05:04:31 AM
So, I've made a pretty little addon for my community, which includes a couple of useful commands for the gamemode Murder. However, on the server, the commands won't show on the XGUI, neither will it autocomplete in the console, yet the command works perfectly. I'm sure I've done everything correctly.

You can check my code at https://github.com/boxama/addons/tree/master/addons/ULX_Murder
I would appreciate any help.
Title: Re: Commands from addon not loading on server
Post by: Cobalt on February 09, 2014, 07:15:00 AM
You have to change 'CATEGORY_NAME' to the name of the section you want it to go in.
Title: Re: Commands from addon not loading on server
Post by: Boxama on February 09, 2014, 07:34:56 AM
Already set (https://github.com/boxama/addons/blob/master/addons/ULX_Murder/lua/ulx/modules/sh/murder.lua#L2). It works perfectly in singleplayer, but not on the server.
Title: Re: Commands from addon not loading on server
Post by: Eccid on February 09, 2014, 08:55:44 AM
Have you done a full restart since adding it? A map change won't always work.
Title: Re: Commands from addon not loading on server
Post by: Boxama on February 09, 2014, 09:00:24 AM
Yep. Several.
I've stated that I tried using autorun. Both work, but don't show in the menu, or at least the category isn't set.
Title: Re: Commands from addon not loading on server
Post by: JamminR on February 09, 2014, 10:07:22 AM
Did you actuaily install it on your server addons path, not just the client? If using fastdl, you'll need it there too of course.
Though you mention seeing it in console during server connect, that could just be the client end.
And make sure you don't have one of the other addon/workshop 'slaynr' releases that are floating around here installed/subscribed. That could be causing odd conflict.
Title: Re: Commands from addon not loading on server
Post by: Boxama on February 09, 2014, 10:19:54 AM
It is installed in addons/ULX_Murder.
I did not know that Lua files must be on FastDL. I will try that.
The slaynr command was made specifically for the gamemode, I don't think any other exists for Murder, I removed my local TTT slaynr commands.
Thanks for your response. Would simply dragging the addon to the FastDL's addon folder work, or would it require something more than that?
Title: Re: Commands from addon not loading on server
Post by: JamminR on February 09, 2014, 10:22:02 AM
Unless GMod13 changed file caching method, there used to have to be something you had to upload to fastdl to get addons to work.
How did you get ULX to work on fastdl? My guess is you'd have to do same for ulx_murder.
Title: Re: Commands from addon not loading on server
Post by: Boxama on February 09, 2014, 10:27:29 AM
ULX is not on FastDL, only in the addons of the server, it works correctly. FastDL is only being used for other maps etc. I'm guessing that means that FastDL wasn't the problem.
Title: Re: Commands from addon not loading on server
Post by: Boxama on February 09, 2014, 10:55:18 AM
I'm an idiot. There's a line at the top of the file to prevent use outside murder, but the GetConvar won't work on client, hence the client error. Thanks for the help.