math.randomseed(os.time()*3)
local print = require("output")
local code = require("encode")
local path = require("gameroot")
love.load = function()
os.setlocale ("", "time")
print(os.date("%c") .. "\n------------------------------\n")
print(io.open(path .. "\\assets\\orange.png")) -- a simple check to make sure the path is correct, prints "file (0x07fef215c500)"
print(pcall(function() return love.graphics.newImage(path .. "\\assets\\orange.png") end)) -- prints "false Could not open file C:/Users/myaccountname/Documents\TestGame\assets\orange.png. Does not exist."
end
love.quit = function()
print("\n------------------------------\n\n\n")
end
What I read on the wiki page said nothing about any special behavior with the path.
If it will help, this is the gameroot file source:
You don't need to provide the full path to any LÖVE function; the path they receive is relative to the project root. It should just be lg.newImage("assets/orange.png").
Welcome to LÖVE by the way!
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics