Help Quad Animations Please

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
MetalMelnic
Prole
Posts: 10
Joined: Sat Mar 04, 2017 3:52 am

Help Quad Animations Please

Post by MetalMelnic »

In my program I'm trying to animate a png image by breaking it up into quads and shifting the quad viewpoint for every frame of animation. My problem is that on line 33 I'm receiving an error: "bad argument #2 to 'draw' (Quad expected, got nil), but earlier in the love.load function I defined that quad. This doesn't make any sense to me since I was following a tutorial series with similar programming (I only flipped the viewpoint from horizontal to vertical) and the program ran fine (version used was the same as me). If you could please take time out of your day to help me that would be wonderful.

Link to tutorial video used: https://www.youtube.com/watch?v=_NpDbNtJyDQ
Attachments
Animation.love.zip
(1.23 KiB) Downloaded 137 times
Before we learn to run, we must first learn to walk;
before we learn to walk, we must first learn to crawl;
Why should programming be any different?
User avatar
zorg
Party member
Posts: 3468
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Help Quad Animations Please

Post by zorg »

The issue is that you're redefining the love.load callback, as in, you have two of them; the latter one overwrites the first, meaning neither img nor quad will be defined.

You probably wanted love.draw as your last function, i suspect it was a copy-paste error. :3
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
MetalMelnic
Prole
Posts: 10
Joined: Sat Mar 04, 2017 3:52 am

Re: Help Quad Animations Please

Post by MetalMelnic »

Thanks! I should have checked more into my functions before posting but thanks again for the help. =)
Before we learn to run, we must first learn to walk;
before we learn to walk, we must first learn to crawl;
Why should programming be any different?
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 3 guests