How a single variable can have many children.I don’t know the correct word.
What is wrong with the below code?
local timer\_array={} local function timerr(timez,image,posn) local timex; table.insert( timer\_array,timex) timex.image=display.newImageRect(image.."png",w/10,w/10) timex.textt=display.newText(timez, xc+(xc/3), yc/8, "jokerman",w/19 ) if posn==1 then timex.image.x,timex.image.y=xc,yc timex.textt.x,timex.textt.y=xc+30,yc elseif posn==2 then timex.image.x,timex.image.y=xc+60,yc timex.textt.x,timex.textt.y=xc+90,yc end timex.time=timez timex.timer=timer.performWithDelay( 1000, function() if timex.timez~=1 then timex.timez=timex.timez-1 timex.textt.text=timex.timez else print("timer stopped") display.remove( timex.image ) display.remove( timex.textt ) timer.cancel( timex.timer ) end end, timex.time) end timerr(20,"life",2)
What is the possible way the-above-said-thing can be done?