main1.lua basically contains code to display a simple picture.
i managed to fix this error
ive tried everything it just wont find main1.lua, using the require function, _G.Main = require(path)
or _G.Main = require(main1)
all files are correct in folder when using show project sandbox
please help
local path = system.pathForFile( “main1.lua”, system.DocumentsDirectory )
local fhd = io.open( path )
– Determine if file exists
if fhd then
print( “main1.lua Exists” )
path=path:gsub("/",".")
--path=path:gsub(".lua","")
--path=(path…".main1.lua")
print(path)
_G.Main = require(path)
fhd:close()
else
print( “Main1.lua does not Exist” )
end