Freydoo

Screen ERROR

Mar 1st, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.97 KB | None | 0 0
  1. screen = peripheral.wrap("back")
  2. z = 1
  3.  
  4. function NeueZeile()
  5. screen.setCursorPos(z,1)
  6. print("Text für Zeile ", z ," eingeben:")
  7. t = io.read()
  8. print("Farbe für Zeile ", z ," auswählen:")
  9. screen.setTextColor("colors."..io.read())
  10. print("Schriftgrösse für Zeile ", z ," eingeben (0.5-5):")
  11. screen.setTextScale(io.read())
  12. screen.print(t)
  13. z = z + 1
  14. WeitereZeile()
  15. end
  16.  
  17. function WeitereZeile()
  18. print("Weitere Zeile? (j/n)")
  19.     if io.read == "j" then
  20.     FSbeibehalten()
  21.     elseif io.read == "n" then
  22.     z = 1
  23.     t = null
  24.     print("Text erfolgreich übernommen!")
  25.     os.sleep(5)
  26.     shell.run('clear')
  27.     else
  28.     shell.run('clear')
  29.     WeitereZeile()
  30.     end
  31. end
  32.  
  33. function FSbeibehalten()
  34. print("Farbe und Schriftgrösse beibehalten? (j/n)")
  35.     if io.read == "n" then
  36.         NeueZeile()
  37.     elseif io.read == "j" then
  38.         print("Text für Zeile ", z ," eingeben:")
  39.         t = io.read()
  40.         screen.print(t)
  41.         z = z + 1
  42.         NeueZeile()
  43.     else
  44.         shell.run('clear')
  45.         FSbeibehalten()
  46.         end
  47. end
  48.  
  49. NeueZeile()
Advertisement
Add Comment
Please, Sign In to add comment