ULX

Author Topic: Noob Lua Question  (Read 2180 times)

0 Members and 1 Guest are viewing this topic.

Offline Doomed

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Noob Lua Question
« on: October 13, 2013, 10:36:33 AM »
So I'm quiet new with lua, but there's 1 thing i'm currently having problems with: I can't get the spawn menu to be enabled. I've derived it from sandbox, so there's no problem there. I also added this to init.lua:(might be wrong though)

Code: [Select]
function GM:SpawnMenuEnabled()
return true;
end

Any ideas?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Noob Lua Question
« Reply #1 on: October 13, 2013, 11:06:17 AM »
http://wiki.garrysmod.com/page/SANDBOX/SpawnMenuEnabled
Tried SANDBOX:SpawnMenuEnabled ?
(MrPresident is probably one of our most experienced gamemode coders here...I'm sure he'll have more questions to assist you if my suggestion isn't correct.
I've no idea if GM in a Sandbox derived gamemode actually becomes 'sandbox')
« Last Edit: October 13, 2013, 11:08:12 AM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

An Error Has Occurred!

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