I hope the title explained my problem right. What the program does is on one side display an input/stats(currently just have Solar Panels)
and on the left side is my menu that I can scroll through and enable/disable with enter which outputs things. Whenever I press enter (or the up/down arrow to scroll) the right(input/stats) side disappears, then reappears in about 1 second. How can I make this not do that?
Code : http://pastebin.com/qJpJLKPm
Whenever I do parallel.waitForAnY() the other display disappears, then reappears in >1 seconds
Started by n1ghtk1ng, Dec 11 2012 03:21 PM
2 replies to this topic
#1
Posted 11 December 2012 - 03:21 PM
#2
Posted 12 December 2012 - 10:09 AM
You don't have to use parallel, you need more like a timer for os.pullEvent(), so every time the timer start an event, then you update the right screen, like this:
local tTimer = os.startTimer(the_time_you_want_it_to_wait_to_update) local event, param = os.pullEvent() if event == "timer" then --update the right screen code end
#3
Posted 12 December 2012 - 10:31 AM
anonimo182, on 12 December 2012 - 10:09 AM, said:
You don't have to use parallel, you need more like a timer for os.pullEvent(), so every time the timer start an event, then you update the right screen, like this:
local tTimer = os.startTimer(the_time_you_want_it_to_wait_to_update) local event, param = os.pullEvent() if event == "timer" then --update the right screen code end
EDIT: I understand how to use the timer, but I don't understand how to use it in my code.
EDIT2: Nevermind! I reread it a little bit later and I understand it now. Thanks!
EDIT3: Tested, it doesn't even print the right side of the screen anymore when I do your timer suggestion. Anyother ideas?
function PrintFinalStats() local tTimer = os.startTimer(3) local event, param = os.pullEvent() if event == "timer" then CheckTime() printDisplay() ReceiveStats() end end
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











