shell.run("WilsonIntro") function wilson() term.write("Wilson: ") local ev, param1, param2 = os.pullEvent() if param1 == 18 then print("Exiting Wilson Program . . .") sleep(0.5) os.reboot() elseif param1 == 25 then os.pullEvent("char") term.write("Program: ") input = read() tostring(input) shell.run(input) elseif param1 == 46 then shell.run("clear") elseif param1 == 35 then shell.run("help") else print("Unrecognized Command. Hit 'h' If You Need Help") end end while true do wilson() end
Now, If I Have The Infinite Loop At The End, My Program Will Throw An Extra Command Whenever I Hit Anything And Thus My Computer Will Say "Unrecognized Command. Hit 'h' If You Need Help". (Screenshot) I Dont Even Know How Its Getting The Second Input . . . Any Ideas?
[NOTE]
It Doesnt Do This If I Dont Use An Infinite Loop