ULX

Author Topic: Where is the modules folder?  (Read 2536 times)

0 Members and 1 Guest are viewing this topic.

Offline Stephen304

  • Jr. Member
  • **
  • Posts: 68
  • Karma: 0
Where is the modules folder?
« on: July 15, 2009, 03:58:57 PM »
I know this is a relatively easy question, but there are a lot of folders called modules.

I'm trying to add in my lua file of wire variables but after trying a couple module folders i can't seem to find the right one. Where is the folder i should use?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Where is the modules folder?
« Reply #1 on: July 15, 2009, 04:43:06 PM »
ulx\lua\ulx\modules
Experiencing God's grace one day at a time.

Offline Stephen304

  • Jr. Member
  • **
  • Posts: 68
  • Karma: 0
Re: Where is the modules folder?
« Reply #2 on: July 15, 2009, 05:19:11 PM »
For some reason i see no difference in the menu before i placed the .lua file in there and after i placed the file there.

Is this correct?

Code: [Select]
ulx.addToMenu( ulx.ID_MADMIN, Max Wire Pods :, { max=100, cvar="sbox_maxwire_pods " } )
I have one of those for each variable i added with just the variable and the name changed from line to line. Is that how its supposed to be?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Where is the modules folder?
« Reply #3 on: July 15, 2009, 05:32:21 PM »
Off the top of my head, remove the space between pods and the quote, and you need "Max Wire Pods:" within quotes. Also, watch your console for errors. They'll help.
Experiencing God's grace one day at a time.

Offline Stephen304

  • Jr. Member
  • **
  • Posts: 68
  • Karma: 0
Re: Where is the modules folder?
« Reply #4 on: July 15, 2009, 06:53:06 PM »
Ok i tried that and now every lien in the lua file looks similar to this:

Code: [Select]
ulx.addToMenu( ulx.ID_MADMIN, Max Lights:, { max=100, cvar="sbox_maxlights" } )
And no errors in the server console or the client console. Nothing seems changed at all in the admin menu.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Where is the modules folder?
« Reply #5 on: July 15, 2009, 08:34:09 PM »
and you need "Max Wire Pods:" within quotes.

ulx.addToMenu( ulx.ID_MADMIN, "Name Of Slider", { max=100, cvar="actual name of convar" } )
« Last Edit: July 15, 2009, 08:35:51 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Stephen304

  • Jr. Member
  • **
  • Posts: 68
  • Karma: 0
Re: Where is the modules folder?
« Reply #6 on: July 16, 2009, 10:46:18 AM »
Whoops missed that.

Thanks now it works great and everything's in the menu.

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given