noob help

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
lismore
Prole
Posts: 2
Joined: Sat Apr 11, 2009 6:41 pm

noob help

Post by lismore »

I'm just trying to follow the documentation for the second tutorial for clicking and dragging an image around, and i get this error::

"No matching function for overloaded 'draw'

Stack traceback:
[C]: in function 'draw'
main.lua:30: in function <main.lua:29>"

I don't understand, my code is not incorrect, I've even copy and pasted the code from the documentation and can't get it to work. When i download the source and run it is seems completely fine, I don't understand what I'm doing wrong here, and I'd hate to just give up on this when just getting started.

What's the deal? thanks
User avatar
mikembley
Citizen
Posts: 72
Joined: Wed Dec 17, 2008 5:30 pm
Location: Blackburn, UK
Contact:

Re: noob help

Post by mikembley »

The code is meant to be read as an example, as it explains what callback functions do

Copying and pasting from the example code boxes would not of worked as it was not meant to be copied and pasted, it was only pseudocode to explain each callback function. Also you would of needed the image file.

Download the full source: http://love2d.org/tutorials/002/callbackfunctions.love
lismore
Prole
Posts: 2
Joined: Sat Apr 11, 2009 6:41 pm

Re: noob help

Post by lismore »

maybe I should clarify. I didn't copy the code verbatim. I wrote the proper code first, and when I saw that this didn't work and i got the error I did I copied that code from the example and i still got the same traceback error. So I didn't just copy the whole code. I had applied the picture to a locally hosted image in my directory, and the picture isn't the problem, because the traceback isn't indicating that (I don't think).

I understand that the code is used as an example, and the source runs fine when i download it, but i can't view the source code for some reason (or I don't know how to open a .love file correctly into text form).

I appreciate the help, but i started moving in other directions and found that the functionality I was concerned with doesn't affect other projects. Still any input would be helpful.

best
benob
Prole
Posts: 6
Joined: Sat Apr 11, 2009 6:28 am

Re: noob help

Post by benob »

you might find that helpful: .love files are actually .zip files ;)
otherwise, post your source here.
User avatar
qubodup
Inner party member
Posts: 775
Joined: Sat Jun 21, 2008 9:21 pm
Location: Berlin, Germany
Contact:

Re: noob help

Post by qubodup »

lismore wrote:I understand that the code is used as an example, and the source runs fine when i download it, but i can't view the source code for some reason (or I don't know how to open a .love file correctly into text form).
Too Slow: a love file is a zip file

did you write "draw" instead of "love.graphics.draw"?

did you give it correct parameters?

Too Slow: if above doesn't help: show us your code!
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: noob help

Post by bartbes »

It sounds like the image is missing..
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Semrush [Bot] and 7 guests