Hi, i don’t know what to put or how to create the question I’m about to ask in the “Topic Title” i apologize for that.
So i have this declaration in one of my lua file named “myData”
[lua]
local M = {}
M.lives = 5
[/lua]
And I’m calling it from another lua file to display from the screen by using this code:
[lua]
local life = display.newText(“Lives x” …myData.lives,0,0,Arial,18)
life:setTextColor(50)
life.x = 75;life.y = 150
[/lua]
I want it to become an image so I’ve tried doing something like:
[lua]
local life = display.newImageRect(“Images/Lives.png” …myData.lives,50,50)
[/lua]
But it will create an error because it will look for an image file which is named “Lives.png5” when i do this.
What code should i use for it to display 5 images of Hearts(example). or 6 Images of Hearts when i changed the value to “M.lives = 6”
Sorry for the title i really don’t know what/how to construct the question for this.
