I have no clue why I’m getting this syntax error.
local mybutton = display.newImage( “playIpad.png”)
local path = system.pathForFile( “playIpad.png”)
local fhd = io.open( path )
– Determine if file exists
if fhd then
print( path )
fhd.close()
else
print( “File does not exist!” )
end
The simulator output keeps saying that on the line where I am calling newImage there is a syntax error. But I don’t see anything and I also checked to make sure invisibles are turned on so I can see everything. I don’t see any syntax error.
BTW the file does exist (it does find it) but I have to comment out the display.newImage() otherwise Lua doesn’t interpret
Syntax error: …/main.lua:17: unexpected symbole near ‘?’ [import]uid: 10652 topic_id: 3216 reply_id: 303216[/import]