Updated errors when LFS is nil

Statfile should not be used when lfs is null.

Also, modified Moose.lua to the correct directory.
This commit is contained in:
svenvandevelde
2016-01-20 20:53:44 +01:00
parent a391ca6ef3
commit 9f830fd768
2 changed files with 22 additions and 16 deletions

View File

@@ -12,7 +12,7 @@ end
Include = {}
Include.MissionPath = script_path() .. "Mission\\"
Include.ProgramPath = "Scripts\\Moose\\"
Include.ProgramPath = "Scripts\\Moose\\Moose\\"
env.info( "Include.MissionPath = " .. Include.MissionPath)
env.info( "Include.ProgramPath = " .. Include.ProgramPath)
@@ -21,9 +21,9 @@ Include.Files = {}
Include.File = function( IncludeFile )
if not Include.Files[ IncludeFile ] then
Include.Files[IncludeFile] = IncludeFile
local f = base.loadfile( Include.MissionPath .. IncludeFile .. ".lua" )
local f = base.loadfile( Include.ProgramPath .. IncludeFile .. ".lua" )
if f == nil then
local f = base.loadfile( Include.ProgramPath .. IncludeFile .. ".lua" )
local f = base.loadfile( Include.MissionPath .. IncludeFile .. ".lua" )
if f == nil then
error ("Could not load MOOSE file " .. IncludeFile .. ".lua" )
else