title: Attempt to index global 'LM' (a nil value)
body: <p>I am working on a some code in Lua and I keep getting this error although it is defined.</p>
  
  <p>It is saying that 'LM' is a nil value when it's clearly not as <code>LM = {}</code> is the first thing I have in my code. I am using that table for functions.</p>
  
  <pre><code>LM = {}
  LM.Classes = {}
  LM.Factions = {}
  LM.Items = {}
  LM.Core = {}
  LM.Ent = {}
  LM.GUI = {}
  LM.Core.ValidLMEntities = {
                  "fm_item",
                  "fm_keys",
                  "fm_fists",
                  "fm_money",
                  }
  
  function LM.Core.IsLMEntity(ent)    
      return IsValid(ent) &amp;&amp; table.HasValue(LM.Core.ValidLMEntities, ent:GetClass())
  end
  </code></pre>
  
  <p>Error message:</p>
  
  <pre><code>[ERROR]
  gamemodes/lemonmuffin/gamemode/sv_core.lua:1: attempt to index global 'LM' (a nil value) 
    1. unknown - gamemodes/lemonmuffin/gamemode/sv_core.lua:1
    2. include - [C]:-1 
    3. unknown - gamemodes/lemonmuffin/gamemode/init.lua:1
  </code></pre>