ich vermute es liegt daran:
22:10:20.660:Failed to run string in Lua:
22:10:20.660:String content: read_ini();
scheint einfach mit der "read_ini()" funktion ein problem zu haben. beim neustarten lädt es ja die config.ini so oder so desshalb klappte das immer, nach dem speichern, nun da ich aber gezielt laden will klemmts:
-- * function used to read data from the config.ini file * --
function read_ini()
local fr = io.open(localAppDir .. fn, "r") -- read from config.ini
-- * --
if fr then -- if file exists then...
lines = fr:read() -- read currently selected line
print("-- * --")
print(fn .. " exists")
print("retrieving settings from " .. fn)
for lines in io.lines(localAppDir .. fn) do
line = string.lower(lines) -- convert all line content to lowercase
if not line:find("#") then -- skip all lines containing "#"
if line:find("file =") then df = string.sub(lines, 8); print("file is currently linked to " .. df) end
-- * window mode * --
if line == "fullscreen = no" then wm:setValue(VConditionValue, false); print("window mode is currently set to Windowed") end
if line == "fullscreen = yes" then wm:setValue(VConditionValue, true); print("window mode is currently set to Fullscreen") end
-- * subtitles * --
if line == "subtitles = no" then subs:setValue(VConditionValue, false); print("subtitles are currently set to Off") end
if line == "subtitles = yes" then subs:setValue(VConditionValue, true); print("subtitles are currently set to On") end
-- * language * --
for i = 1, table.maxn(t_lang) do if line == ("language = " .. string.lower( t_lang:getName() )) then game:setValue(VGameStandardLanguage, t_lang); print("language is currently set to " .. game:getLink(VGameStandardLanguage):getName()) end end
-- * sound levels * --
if line:find("musicvolume =") then print("music volume = " .. getVolume(eMusicVolume)) end
if line:find("soundvolume =") then print("sound volume = " .. getVolume(eSoundVolume)) end
if line:find("speechvolume =") then print("speech volume = " .. getVolume(eSpeechVolume)) end
if line:find("movievolume =") then print("movie volume = " .. getVolume(eMovieVolume)) end
if line:find("globalvolume =") then print("global volume = " .. getVolume(eGlobalVolume)) end
end
end
fr:close()
print("successfully retrieved settings from " .. fn)
else
print(fn .. " does not exist")
end
end