Im running an io.open command to read in some data files from a fixed location. It works on my Desktop machine fine (Win 11 Pro +i9 and RTX 3070). however, when I run the same code on my laptop (Win 11 Home + i9 RTX 4070) it throws the error using the io.open.
Here is the sample command:
local fh, err = io.open( assetfilename, "rb" )
if( fh == nil ) then
pprint("[Error] Cannot open asset file: "..assetfilename.." with error: "..tostring(err) )
return nil
end
The file path has ben checked. Ive used full paths, relative paths, win paths and linux paths. But I would expect a “File Not Found” err instead. So this is a little confusing.
Other things I tried were admin rights, file rights and similar security/firewall settings.
I was wondering if it might be timing. This occurs very early in the startup process of the application and I wonder because my laptop is quite a bit quicker than my desktop, that there is some incomplete setup for lua when its being called (grasping at straws, I know).
If anyone could make some suggestions or knows what might be causing this, Id be extremely grateful.