Skip to content

Commit 6691a8c

Browse files
authored
Create Boot.lua
Initial Commit
1 parent 908b3f9 commit 6691a8c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Boot.lua

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
function file_exists(name)
2+
local f=io.open(name,"r")
3+
if f~=nil then io.close(f) return true else return false end
4+
end
5+
6+
function lines_from(file)
7+
lines = {}
8+
for line in io.lines(file) do
9+
lines[#lines + 1] = line
10+
end
11+
return lines
12+
end
13+
14+
if not file_exists("LoadLevelScript.lcfg") then
15+
print("file does not exist!")
16+
os.exit()
17+
end
18+
19+
local configGrab = lines_from("LoadLevelScript.lcfg")
20+
print(configGrab[1])
21+
print(configGrab[2] .. ".lua")
22+
SubProject_Switch(configGrab[1], configGrab[2] .. ".lua")

0 commit comments

Comments
 (0)