You could make the code much more compact like this, it depends whether you really want to show the state names in text:
state = 1State names might be 'menu', 'play', 'game over' or 'attack', 'flee', 'defend' etc :D
statenames={'One','Two','Three'}
function TIC()
cls(0)
if btnp(4) then
state=state+1
if state==4 then state=1 end
end
print(statenames[state],0,0)
end