Page 1 of 1

quad can't be nil

Posted: Sun Oct 16, 2016 1:57 pm
by McFree
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

Re: quad can't be nil

Posted: Sun Oct 16, 2016 2:16 pm
by RaycatRakittra
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.

Re: quad can't be nil

Posted: Sun Oct 16, 2016 2:37 pm
by McFree
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

Re: quad can't be nil

Posted: Sun Oct 16, 2016 6:23 pm
by raidho36
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.

Re: quad can't be nil

Posted: Mon Oct 17, 2016 6:32 pm
by McFree
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?

Re: quad can't be nil

Posted: Mon Oct 17, 2016 6:38 pm
by Zireael
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.