Author Topic: Commands from addon not loading on server  (Read 3382 times)

0 Members and 1 Guest are viewing this topic.

Offline Boxama

  • Newbie
  • *
  • Posts: 12
  • Karma: 1
Commands from addon not loading on server
« 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.
  • The path for the file is addons/ULX_Murder/lua/ulx/modules/sh/murder.lua
  • I practically copy/pasted one of your commands to make a template
  • The command shows up perfectly in singleplayer
  • I have tried placing it in autorun then lua_openscript autorun/murder.lua. The same thing happens
  • The addon has an addon.txt
  • I have tried restarting the server several times
  • The permissions appear under "_Uncategorized Cmds"
  • After connecting to the server I see the message in console confirming that it has been loaded: "[ULX] Loading SHARED module: murder.lua"

You can check my code at https://github.com/boxama/addons/tree/master/addons/ULX_Murder
I would appreciate any help.

Offline Cobalt

  • Full Member
  • ***
  • Posts: 216
  • Karma: 44
  • http://steamcommunity.com/id/__yvl/
Re: Commands from addon not loading on server
« Reply #1 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.

Offline Boxama

  • Newbie
  • *
  • Posts: 12
  • Karma: 1
Re: Commands from addon not loading on server
« Reply #2 on: February 09, 2014, 07:34:56 AM »
Already set. It works perfectly in singleplayer, but not on the server.

Offline Eccid

  • Full Member
  • ***
  • Posts: 115
  • Karma: 11
  • Hey, come on... We just met...
    • Terror Abound! Steam Group
Re: Commands from addon not loading on server
« Reply #3 on: February 09, 2014, 08:55:44 AM »
Have you done a full restart since adding it? A map change won't always work.

Offline Boxama

  • Newbie
  • *
  • Posts: 12
  • Karma: 1
Re: Commands from addon not loading on server
« Reply #4 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.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Commands from addon not loading on server
« Reply #5 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.
« Last Edit: February 09, 2014, 10:10:27 AM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Boxama

  • Newbie
  • *
  • Posts: 12
  • Karma: 1
Re: Commands from addon not loading on server
« Reply #6 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?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Commands from addon not loading on server
« Reply #7 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.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Boxama

  • Newbie
  • *
  • Posts: 12
  • Karma: 1
Re: Commands from addon not loading on server
« Reply #8 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.

Offline Boxama

  • Newbie
  • *
  • Posts: 12
  • Karma: 1
Re: Commands from addon not loading on server
« Reply #9 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.