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

Why does f.close() print a number? [solved]

Started by zapwow, 02 June 2012 - 02:52 AM
zapwow #1
Posted 02 June 2012 - 04:52 AM

lua> f = io.open("test", "w")
lua> f.close()
12

Why does f.close() always print a number? Is there any way to prevent this? It is very disruptive to my programs.
Luanub #2
Posted 02 June 2012 - 05:04 AM
Its probably an error message, you need to do :close() with the io API not .close()
zapwow #3
Posted 02 June 2012 - 05:09 AM
of course :)/>/>
thanks!