Jump to content




Too long without yelding


2 replies to this topic

#1 Mr_Programmer

  • Members
  • 95 posts
  • LocationA CPU some where in Bolton, UK

Posted 08 April 2016 - 07:07 PM

I have this RF tracker program that i have been tinkering with (as i remebered i had it) but when i run it, it runs then errors saying too long without yelding, how do i stop this

cell1 = "powered_tile_1"
cell2 = "powered_tile_2"
cell3 = "powered_tile_3"
cell4 = "powered_tile_4"
cell5 = "powered_tile_5"

mon = peripheral.wrap("monitor_25")

while true do
		energy1 = peripheral.call(cell1, "getEnergyStored")
				mon.setCursorPos(1,1)
				mon.write("EnergyCell #1".." : "..energy1.." RF")
end

Edited by Mr_Programmer, 08 April 2016 - 07:08 PM.


#2 COOLGAMETUBE

  • Members
  • 49 posts
  • LocationGermany

Posted 08 April 2016 - 07:08 PM

you need to use sleep to yield in the while.

#3 Mr_Programmer

  • Members
  • 95 posts
  • LocationA CPU some where in Bolton, UK

Posted 08 April 2016 - 07:10 PM

View PostCOOLGAMETUBE, on 08 April 2016 - 07:08 PM, said:

you need to use sleep to yield in the while.

Cheers





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users