Hey guys I need some quick help with my code.
I have a functions display new text (previously called).
However when I use a timer and make it remove the text I does not work.
Here is the code
local currentWorkout function timeWorkout(event) currentWorkout:removeSelf() end function workoutStarted(event) currentWorkout = display.newText(activityCurrent, 100,500, native.systemFont, 46) currentWorkout:setTextColor(0,0,0) timer.performWithDelay( timeTotal, timeWorkout, 10 ) end
Here is the error I am getting.
Attempt to call method ‘removeSelf’ (a nil value)
Thanks for the help 