I can't seem to put together a variable
Posted: Fri Jun 21, 2013 6:57 pm
So I was trying to do this little love program that saves coordinates to a variable but for some reason it isn't saveing them right.
Basically whenever you press the left mouse button the coordinates of the mouse's current position are saved to pointx pointy[a]
And once there are more than 3 coordinates for both X and Y there is an if code (well, it's a for inside an if) in the love.update(dt) that puts all the coordinates together in one variable called startxy and each coordinate is separated by a comma ",". It does that so that they can be used to draw a line like love.graphics.line(startxy)
This for code is not coded right but I can't seem to see what's wrong with it.
So can somebody please find what's wrong in this code also ignore all the cluster in there, I haven't properly cleaned it yet.
Thanks for reading and please help me on this
Basically whenever you press the left mouse button the coordinates of the mouse's current position are saved to pointx pointy[a]
And once there are more than 3 coordinates for both X and Y there is an if code (well, it's a for inside an if) in the love.update(dt) that puts all the coordinates together in one variable called startxy and each coordinate is separated by a comma ",". It does that so that they can be used to draw a line like love.graphics.line(startxy)
This for code is not coded right but I can't seem to see what's wrong with it.
So can somebody please find what's wrong in this code also ignore all the cluster in there, I haven't properly cleaned it yet.
Thanks for reading and please help me on this