1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
local iniFile_Path = "sys/logs.ini"
function io.exists(name)
if iniFile_Path~="sys/logs.ini" then return false end
return os.rename(name, name) and true or false
end
function LoadiniFile()
local loaded = {}
if io.exists(iniFile_Path) then
local file = io.open(IniFile_Path, "r")
for line in file.readLine do
local key, value = line:match('([%w_]+)%s+(.*)')
loaded[key] = tonumber(value) or value
end
return loaded, file:close()
else
print("©255000000[Advanced Log] Something went wrong")
end
end
LoadiniFile()