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

Success and Failure Messages

Started by Bubbycolditz, 27 December 2016 - 12:00 AM
Bubbycolditz #1
Posted 27 December 2016 - 01:00 AM
Today i would like to know, how I can send a successful message when an event is completed. Since I am making a brand new operating system called BubblocraftOS, I want to notify the users whether the events such as Creating the files is successful for the user to expirence.

OS: pastebin run js0Na26u
Website: pastebin.com/js0Na26u

Thanks to whoever or everyone who helps me!! :)/>
Bomb Bloke #2
Posted 27 December 2016 - 07:47 AM
Notify how?
TheRockettek #3
Posted 27 December 2016 - 09:47 AM
you could just do

file = fs.open("<someFile>","w")

if file then
  file.writeLine("hi")
  file.close()
  print("Success")
else
  print("An error occured whilst creating file")
end
Edited on 27 December 2016 - 09:33 AM
Bubbycolditz #4
Posted 27 December 2016 - 02:12 PM
EDIT: Oh now I see. Thanks!! :)/> :P/>
Edited on 27 December 2016 - 02:23 PM