My game is crashing!

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
XxFullMetalxX
Prole
Posts: 9
Joined: Thu Jul 04, 2013 5:52 pm

My game is crashing!

Post 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!
spectralcanine
Citizen
Posts: 65
Joined: Sat Dec 22, 2012 8:17 am

Re: My game is crashing!

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

Who is online

Users browsing this forum: No registered users and 3 guests