- Code: Select all
local find_file=io.open(File_Folder .. filename, "r");
it used to work thats the problem, the error log in the script editor does not post any errors.
- Code: Select all
File_Folder = sky.getDir_ProjectOrGameFolder() -- project Or Game assets folder
-- find_settings_file = nil;
musicVol = 1;
effectsVolume = 1;
function onInit(objID)
obj = objID;
find_file(render.pml) --pass the filename to the find_file function
end
function find_file( filename )
sky.trace();
local find_file=io.open(File_Folder .. filename, "r");
lprint( File_Folder ); -- does the string look right --doesn't get this far now
lprint( filename ); -- is the filename correct.
-- =====================================================
-- = If no file exists then call the Create_File function
-- = and pass the file name to that function
-- =====================================================
if (find_file==nil) then
elseif (filename=="config.pml") then
Create_File(filename)
else
Read_File(filename)
end
end