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

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
justthoseguys12
Prole
Posts: 13
Joined: Fri Nov 22, 2024 7:18 pm

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

Post 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
Attachments
main.love
(55.07 MiB) Downloaded 180 times
:neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :3 :neko: :neko: :neko: :neko: :neko: :neko: :neko: :3 :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko:
User avatar
pgimeno
Party member
Posts: 3672
Joined: Sun Oct 18, 2015 2:58 pm

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

Post by pgimeno »

The error is due to missing quotes around the file name, "Cowbelly.ogv".
User avatar
justthoseguys12
Prole
Posts: 13
Joined: Fri Nov 22, 2024 7:18 pm

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

Post by justthoseguys12 »

thats it? thanks :3
:neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :3 :neko: :neko: :neko: :neko: :neko: :neko: :neko: :3 :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko:
User avatar
justthoseguys12
Prole
Posts: 13
Joined: Fri Nov 22, 2024 7:18 pm

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

Post by justthoseguys12 »

so that is not what is wrong even when i put the quotation marks
:neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :3 :neko: :neko: :neko: :neko: :neko: :neko: :neko: :3 :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko:
User avatar
justthoseguys12
Prole
Posts: 13
Joined: Fri Nov 22, 2024 7:18 pm

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

Post by justthoseguys12 »

i figured it out so its all good but it has no audio
:neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :3 :neko: :neko: :neko: :neko: :neko: :neko: :neko: :3 :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko:
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests