Closed MadPie closed 8 years ago
Was .../tutorials/04-drawing/
your current directory when you ran that script?
The relevant line:
local img = trySDL(image.load, "Lua-SDL2.png")
Tries to find Lua-SDL2.png
in the current directory; it does not guess where the script folder is.
In other words, you should be running:
04-drawing$ lua tutorial.lua
And not:
luasdl2$ lua tutorials/04-drawing/tutorial.lua
Have you gotten things working?
Actually, luasdl2 worked fine on my laptop. The error only happened on my other machine, and I guess it is just a distro inconsistency. Thank you for the help.
Debugging session started in '/opt/zbstudio/myprograms/'. ...e/warpspeedscp/luasdl2/tutorials/04-drawing/tutorial.lua:19: Couldn't open Lua-SDL2.png stack traceback: [C]: in function 'error' ...e/warpspeedscp/luasdl2/tutorials/04-drawing/tutorial.lua:19: in local 'trySDL' ...e/warpspeedscp/luasdl2/tutorials/04-drawing/tutorial.lua:48: in main chunk Debugging session completed (traced 26 instructions). Program completed in 40.08 seconds (pid: 2418).
I was testing SDL2 after installation, and this is what happened. It ran into a problem when image.load() was called. Any ideas on why this is happening