TILE GAME!

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.
nunix
Prole
Posts: 28
Joined: Fri Jan 30, 2009 4:38 am

Re: TILE GAME!

Post by nunix »

Ah! So I did. I always do that for some reason. -.- Actual error is:

main.lua:12: Incorrect parameter type: expected userdata.

Line 12 is the love.graphics.draw line
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: TILE GAME!

Post by bartbes »

It's kind of obvious now that I've seen the error, you're passing strings to love.graphics.draw, which only takes Drawables (that's why I linked it :P), you should be using love.graphics.print instead.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: TILE GAME!

Post by Robin »

Also, for the future, it might be useful to provide a .love (exactly the way it is as you experience the error) and tell us how you get the error (in this case simply by running it). That way the people that could help you have all the information they need without having to play a back-and-forth game like this one. Here it was really short, but it can get rather long, especially if there are miscommunications involved. Giving us the offending .love makes it a lot easier for everyone. :)
Help us help you: attach a .love.
nunix
Prole
Posts: 28
Joined: Fri Jan 30, 2009 4:38 am

Re: TILE GAME!

Post by nunix »

bartbes: duhhh. Thanks. This was just sample code from the linked tutorial so it's not mine, so hopefully the person will see this and make the update. ;)
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: TILE GAME!

Post by kikito »

The error seems to be that I wrote love.graphics.draw instead of love.graphics.print.

Please change draw for print, and see how it goes.
When I write def I mean function.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: TILE GAME!

Post by bartbes »

Heh, I see you missed a page there, kikito ;).
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: TILE GAME!

Post by kikito »

:oops: ^^
When I write def I mean function.
Post Reply

Who is online

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