Search found 3 matches
- Thu Feb 08, 2018 5:11 am
- Forum: Support and Development
- Topic: Load image from different directory
- Replies: 3
- Views: 5244
Re: Load image from different directory
this should work: local file = io.open(self:path(path) , "r") local contents = file:read("*all") local data = love.filesystem.newFileData( contents, "img.png", "file" ) local imgdata = love.image.newImageData( data ) file:close() local img = love.graphics.rawN...
- Tue Feb 21, 2017 9:36 pm
- Forum: Support and Development
- Topic: upvalues not working
- Replies: 3
- Views: 2901
Re: upvalues not working
Thank you.
ps. I used print in console not love.errhand()
ps. I used print in console not love.errhand()
- Tue Feb 21, 2017 12:37 pm
- Forum: Support and Development
- Topic: upvalues not working
- Replies: 3
- Views: 2901
upvalues not working
ret = function()
return x
end
debug.setupvalue(ret , 1 , {x = 90})
love.errhand( ret() )
shows nil when it should return 90
this workes in the lua console on mac.
thanks
return x
end
debug.setupvalue(ret , 1 , {x = 90})
love.errhand( ret() )
shows nil when it should return 90
this workes in the lua console on mac.
thanks