Don't like ads? PRO users don't see any ads ;-)
Guest

function statusUpdate() w

By: a guest on May 25th, 2012  |  syntax: Lua  |  size: 0.25 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function statusUpdate()
  2.     while true do
  3.         print("You are confused.")
  4.         coroutine.yield()
  5.     end
  6. end
  7.  
  8. local update = coroutine.create(statusUpdate)
  9. coroutine.resume(update)
  10.  
  11. --[[
  12.    This would output "You are confused." once
  13.    ]]--