Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- if fs.exists("prenom") then
- h = fs.open("prenom", "r")
- prenom = h.readAll()
- --prenom = h.readLine()
- h.close()
- term.setTextColor(colors.yellow)
- print("Bonjour "..prenom.." !")
- term.setTextColor(colors.red)
- print("Mais peut-etre veux-tu changer de prenom ?")
- term.setTextColor(colors.blue)
- print("Si oui, indique ton nouveau prenom ci-dessous, sinon frappe simplement la touche ENTREE de ton clavier.")
- new = read()
- if new ~= "" then
- h = fs.open("prenom", "w")
- h.write(new)
- h.close()
- term.setTextColor(colors.yellow)
- print("A bientot "..new.." !")
- end
- else
- h = fs.open("prenom", "w")
- term.setTextColor(colors.yellow)
- print("Quel est ton prenom : ")
- h.write(read())
- h.close()
- end
Advertisement
Add Comment
Please, Sign In to add comment