This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
jerry242's profile picture

[Question] The write-command and GUIs

Started by jerry242, 12 March 2012 - 10:30 PM
jerry242 #1
Posted 12 March 2012 - 11:30 PM
I am having difficulties with the write-function. I know that it prints its argument without skipping too the next line, but when I run multiple write-commands after each other, the screen is blank. I was planning on making a GUI, but that has been put on hold by this error. Any help appreciated :mellow:/>/>

Edit:
Added code.

Spoiler
function getCode()
  sleep(2);
  sEvent, p1, p2 = os.pullEvent();
  lol = rs.getBundledInput("back")
  if lol == 100 then
    sleep(.1);
    while test do
	  char = rs.getBundledInput("back");
   if char == 1 then write(_1)
   elseif char == 2 then write(_2);
   elseif char == 3 then write(_3);
   elseif char == 4 then write(_4);
   elseif char == 5 then write(_5);
   elseif char == 6 then write(_6);
   elseif char == 7 then write(_7);
   elseif char == 8 then write(_8);
   elseif char == 9 then write(_9);
   elseif char == 10 then write(_0);
   elseif char == 11 then write(_11);
   elseif char == 12 then write(_12);
   elseif char == 13 then write(_13);
   elseif char == 14 then write(_14);
   elseif char == 15 then write(_15);
   elseif char == 16 then write(_16);
   elseif char == 17 then write(_17);
   elseif char == 18 then write(_18);
   elseif char == 19 then write(_19);
   elseif char == 20 then write(_20);
   elseif char == 21 then write(_21);
   elseif char == 22 then write(_22);
   elseif char == 23 then write(_23);
   elseif char == 24 then write(_24);
   elseif char == 25 then write(_25);
   elseif char == 26 then write(_26);
   elseif char == 27 then write(_27);
   elseif char == 28 then write(_28);
   elseif char == 29 then write(_29);
   elseif char == 30 then write(_30);
   elseif char == 31 then write(_31);
   elseif char == 32 then write(_32);
   elseif char == 33 then write(_33);
   elseif char == 34 then write(_34);
   elseif char == 35 then write(_35);
   elseif char == 36 then write(_36);
   elseif char == 37 then write(_37);
   elseif char == 38 then write(_38);
   elseif char == 39 then write(_39);
   elseif char == 40 then write(_40);
   elseif char == 41 then write(_41);
   elseif char == 42 then write(_42);
   elseif char == 43 then write(_43);
   elseif char == 44 then write(_44);
   elseif char == 45 then write(_45);
   elseif char == 46 then write(_46);
   elseif char == 47 then write(_47);
   elseif char == 48 then write(_48);
   elseif char == 49 then write(_49);
   elseif char == 50 then write(_50);
   elseif char == 101 then
    test = false;
    print("");
   end
   sleep(.2);
end
  end
end
Casper7526 #2
Posted 13 March 2012 - 12:52 AM
Your code?
jerry242 #3
Posted 13 March 2012 - 02:27 AM
I am on a phone right now… Will edit it in tomorrow :mellow:/>/>