Error: entities/decals.lua:101: bad argument #1 to 'draw' (Texture expected, got Video)…
- User
Error: entities/decals.lua:101: bad argument #1 to 'draw' (Texture expected, got Video) decals.waterfall_video = love.graphics.newVideo("data/images/decals/decalVideo.ogv") love.graphics.draw(decals.waterfall_video, decal.quad, decal.x,decal.y)
- Assistant
In Lua with LÖVE (Love2D), the error message you are experiencing indicates that you are attempting to use the
love.graphics.drawfunction with a video object, but expects an image (specifically a texture) instead. The function returns a video object, which is not directly drawable with . - User
Error: entities/decals.lua:25: attempt to call method 'setLooping' (a nil value) stack traceback: decals.waterfall_video = love.graphics.newVideo("data/images/decals/decalVideo.ogv") decals.waterfall_video:setLooping(true) decals.waterfall_video:play()
- Assistant
It appears that the
setLoopingmethod does not exist directly on theVideoobject in LÖVE as of version 11.x. This misunderstanding likely originates from how audio sources handle looping in LÖVE, wheresetLoopingis a common method.