ULX

Author Topic: Help needed  (Read 2333 times)

0 Members and 1 Guest are viewing this topic.

Offline eman7777777

  • Newbie
  • *
  • Posts: 3
  • Karma: -1
Help needed
« on: October 02, 2015, 06:35:13 PM »
Hello, I installed ulx and ulib on the server correctly.  But, at some point some of my commands got put into the "uncategorized" section for some reason.  Now none of the ranks can use them despite having permission to do so.  Can someone help me out?

I installed the custom commands addon if that helps any, and I have utime installed as well.

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Help needed
« Reply #1 on: October 03, 2015, 08:38:24 AM »
The _Uncategorized section in the permissions pane is for permissions that were assigned to people or groups, but no longer/never existed. You must have done something to make those commands not be loaded any more. Make sure you aren't getting any console errors.
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline Buzzkill

  • Respected Community Member
  • Full Member
  • *****
  • Posts: 176
  • Karma: 59
    • The Hundred Acre Bloodbath
Re: Help needed
« Reply #2 on: October 04, 2015, 07:47:08 AM »
Uncategorized is used for any commands that don't have a category defined at declaration.  It doesn't necessarily imply a permissions issue.  It's not uncommon to have commands in uncategorized, especially if you move things around and forget to either hard-code the category or include the variable that contains the value.  For example, below would be uncategorized if I forgot to set CATEGORY_NAME to a value in the script.

That being said, if something is showing in uncategorized AND showing unexpected permissions issues (ie, you don't have an obvious permissions configuration issue), then I'd say something is more deeply wrong with the script than simply a missing cat name.



Code: [Select]
function ulx.vote( calling_ply, title, ... )
if ulx.voteInProgress then
ULib.tsayError( calling_ply, "There is already a vote in progress. Please wait for the current one to end.", true )
return
end

ulx.doVote( title, { ... }, voteDone )
ulx.fancyLogAdmin( calling_ply, "#A started a vote (#s)", title )
end
local vote = ulx.command( CATEGORY_NAME, "ulx vote", ulx.vote, "!vote" )
vote:addParam{ type=ULib.cmds.StringArg, hint="title" }
vote:addParam{ type=ULib.cmds.StringArg, hint="options", ULib.cmds.takeRestOfLine, repeat_min=2, repeat_max=10 }
vote:defaultAccess( ULib.ACCESS_ADMIN )
vote:help( "Starts a public vote." )
« Last Edit: October 04, 2015, 07:49:34 AM by Buzzkill »

Offline eman7777777

  • Newbie
  • *
  • Posts: 3
  • Karma: -1
Re: Help needed
« Reply #3 on: October 07, 2015, 12:12:16 PM »
I haven't changed anything, can someone tell me where the command configurations are set up at? I tried looking through all the addons and data files and did ctl + f on every single file to try to find the missing commands to no avil. 

Offline eman7777777

  • Newbie
  • *
  • Posts: 3
  • Karma: -1
Re: Help needed
« Reply #4 on: October 07, 2015, 12:14:57 PM »
I am getting script errors but it doesn't show me the problem when I open the console.