Page 1 of 1

My game is crashing!

Posted: Sun Jul 07, 2013 1:03 am
by XxFullMetalxX
When ever I try to run my game it says "graphics.lua:1265: bad argument #2 to print1(number expected, got nil)"

This is the code it said want wrong:

Code: Select all

love.graphics.print( v.text, v.x, v.y )
Please help!

Re: My game is crashing!

Posted: Sun Jul 07, 2013 1:05 am
by spectralcanine
The error clearly tells you what the issue is. It was expecting a number and it got nil. From that you can conclude that either (or both) of v.x and v.y is nil.
BUT, the error even goes further to tell you that argument 2 is the nil one. If you do a count from one to two, you'd see that v.x is the second argument.
Actually reading the error message might help in the future...