ComputerCraft Forums

ComputerCraft => Ask a Pro => Topic started by: 4x4x8 on Sep 17, 2022, 07:07 AM

Title: Coroutine repeat if variable == true?
Post by: 4x4x8 on Sep 17, 2022, 07:07 AM
i got this code:
variable = not variable
coroutine.resume(coro, variable)

what i need put in this code, or in coro code to make it repeat if variable == true?
Title: Coroutine repeat if variable == true?
Post by: Lupus590 on Sep 17, 2022, 01:22 PM
It sounds like you need a loop of some kind or an If statement, I would search online for control structures in lua (https://www.lua.org/pil/4.3.html).