Page 1 of 1

my video wont play at all and i dont know what to do

Posted: Sun Nov 24, 2024 1:00 am
by justthoseguys12
so i cant get my video to play on a loop or at all and idk what to do

this is my error and I also have the file and here is the code as well

Code: Select all

Error

main.lua:10: attempt to index global 'Cowbelly' (a nil value)


Traceback

[love "callbacks.lua"]:228: in function 'handler'
main.lua:10: in function 'load'
[love "callbacks.lua"]:136: in function <[love "callbacks.lua"]:135>
[C]: in function 'xpcall'
[C]: in function 'xpcall'

Code: Select all

function love.load()
  whale = love.graphics.newImage("whale.jpg")

  wow = love.audio.newSource("wow.mp3", "static")

  follow = love.graphics.newImage("follow.png")

  gofollow = love.graphics.newImage("Go follow.png")

  cowbelly = love.video.newVideo( Cowbelly.ogv )
    cowbelly:play()

  love.window.setFullscreen(true, "desktop")
end
function love.draw()
	love.graphics.draw(whale, 300, 200) 

        love.graphics.draw(follow, 200, 500)

        love.graphics.draw(gofollow, 200, 100)

        love.graphics.draw(cowbelly, 900, 900)
end
function love.update(dt)
	if not wow:isPlaying( ) then
		love.audio.play( wow )
	end
end
function love.keypressed(key, scancode, isrepeat)
   if key == "escape" then
      love.event.quit()
   end
end

Re: my video wont play at all and i dont know what to do

Posted: Sun Nov 24, 2024 8:58 am
by pgimeno
The error is due to missing quotes around the file name, "Cowbelly.ogv".

Re: my video wont play at all and i dont know what to do

Posted: Sun Nov 24, 2024 6:19 pm
by justthoseguys12
thats it? thanks :3

Re: my video wont play at all and i dont know what to do

Posted: Mon Dec 02, 2024 2:25 pm
by justthoseguys12
so that is not what is wrong even when i put the quotation marks

Re: my video wont play at all and i dont know what to do

Posted: Tue Dec 03, 2024 4:17 pm
by justthoseguys12
i figured it out so its all good but it has no audio