quad can't be nil

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
McFree
Prole
Posts: 12
Joined: Thu Aug 11, 2016 7:31 am

quad can't be nil

Post 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
User avatar
RaycatRakittra
Prole
Posts: 22
Joined: Fri Sep 30, 2016 12:40 am
Location: Chicago, IL
Contact:

Re: quad can't be nil

Post 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.
Sometimes, I can code things.
McFree
Prole
Posts: 12
Joined: Thu Aug 11, 2016 7:31 am

Re: quad can't be nil

Post 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
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: quad can't be nil

Post 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.
McFree
Prole
Posts: 12
Joined: Thu Aug 11, 2016 7:31 am

Re: quad can't be nil

Post 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?
Zireael
Party member
Posts: 139
Joined: Fri Sep 02, 2016 10:52 am

Re: quad can't be nil

Post 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.
Post Reply

Who is online

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