Hello, I created an account just for this.
I am having some trouble with variables and love.graphics.print, not much more to say. Now I won't post my whole code, here are the important bits:
You should have posted this in "Support and Development", not here. But this is just technical detail. Well, if that's how you're managing it in your game, I can pretty much see what you are doing wrong: you're trying to change a variable that doesn't exists. Okay, you can see it there on love.load, but the game doesn't. It is inside a table, which means that the variable should always be associated to the table. In your code, replace all the "add" that is alone by "player.add" or "player["add"]". This way, you'll be telling the game that the right variable to look for is inside the table "player", and not by itself
AAAAND someone posted before me. Pretty much the same thing
HugoBDesigner wrote:You should have posted this in "Support and Development", not here. But this is just technical detail. Well, if that's how you're managing it in your game, I can pretty much see what you are doing wrong: you're trying to change a variable that doesn't exists. Okay, you can see it there on love.load, but the game doesn't. It is inside a table, which means that the variable should always be associated to the table. In your code, replace all the "add" that is alone by "player.add" or "player["add"]". This way, you'll be telling the game that the right variable to look for is inside the table "player", and not by itself
AAAAND someone posted before me. Pretty much the same thing
veethree wrote:You put the "add" variable into the player table. So to use it in the code you need to do "player.add" not just "add".