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 .
McFree
Prole
Posts: 12 Joined: Thu Aug 11, 2016 7:31 am
Post
by McFree » Sun Oct 16, 2016 1:57 pm
When creating a card through Tiles began to emerge error that quad does not accept to nil (the second parameter can be nil)
Code: Select all
love.graphics.draw(self.img,tile.quad,tile.pos.x,tile.pos.y)
reference to project
Link
P.S. unfortunately I can not describe the error in more detail because they do not understand because of what she
RaycatRakittra
Prole
Posts: 22 Joined: Fri Sep 30, 2016 12:40 am
Location: Chicago, IL
Contact:
Post
by RaycatRakittra » Sun Oct 16, 2016 2:16 pm
So, 1) the code that you quoted means nothing in context of the question. 2) Looking at the LOVE wiki:
Code: Select all
quad = love.graphics.newQuad( x, y, width, height, sw, sh )
the second argument DEFINITELY cannot be nil.
Sometimes, I can code things.
McFree
Prole
Posts: 12 Joined: Thu Aug 11, 2016 7:31 am
Post
by McFree » Sun Oct 16, 2016 2:37 pm
RaycatRakittra wrote: So, 1) the code that you quoted means nothing in context of the question. 2) Looking at the LOVE wiki:
Code: Select all
quad = love.graphics.newQuad( x, y, width, height, sw, sh )
the second argument DEFINITELY cannot be nil.
Russian:
К сожалению я не могу показать только часть кода так как тут будет последовательно почти половина проекта
English:
Unfortunately I can not show only part of the code because there will be a series, almost half of the project
raidho36
Party member
Posts: 2063 Joined: Mon Jun 17, 2013 12:00 pm
Post
by raidho36 » Sun Oct 16, 2016 6:23 pm
Well, it can't be nil, end of story. It has to know what to draw before it can draw it.
Fire up a debugger and see where the quad reference becomes nil.
McFree
Prole
Posts: 12 Joined: Thu Aug 11, 2016 7:31 am
Post
by McFree » Mon Oct 17, 2016 6:32 pm
raidho36 wrote: Well, it can't be nil, end of story. It has to know what to draw before it can draw it.
Fire up a debugger and see where the quad reference becomes nil.
How do I run debug?
The fact that he wrote in the console is a debug?
Zireael
Party member
Posts: 139 Joined: Fri Sep 02, 2016 10:52 am
Post
by Zireael » Mon Oct 17, 2016 6:38 pm
Try downloading Zerobrane IDE and following the instructions on how to set up a debugger for LOVE on their site. It's a couple of lines in main.lua, but a godsend indeed.
Users browsing this forum: Bing [Bot] , Google [Bot] and 5 guests