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
noob help
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: noob help
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
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
Re: noob help
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
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
Re: noob help
you might find that helpful: .love files are actually .zip files
otherwise, post your source here.
otherwise, post your source here.
- qubodup
- Inner party member
- Posts: 775
- Joined: Sat Jun 21, 2008 9:21 pm
- Location: Berlin, Germany
- Contact:
Re: noob help
Too Slow: a love file is a zip filelismore 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).
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)
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: noob help
It sounds like the image is missing..
Who is online
Users browsing this forum: Bing [Bot] and 7 guests