Difference between revisions of "Talk:IO (API)"

From ComputerCraft Wiki
Jump to: navigation, search
(What features are trimmed down?)
(Why this code leads to error?)
Line 6: Line 6:
 
==Why this code leads to error?==
 
==Why this code leads to error?==
  
local f=io.open("testfile","w")
+
local f=io.open("testfile","w")[br]
io.output(f)    --Error "attempt to call nil" - Why? f contains data (table:7a86c)--  
+
io.output(f)    --Error "attempt to call nil" - Why? f contains data (table:7a86c)-- [br]
io.write(...)
+
io.write(...)[br]
f:close()
+
f:close()[br]

Revision as of 15:01, 25 July 2012

What features are trimmed down?

it's kinda useless to say that features are trimmed down, if there's no list. Graypup 01:57, 21 June 2012 (UTC)

Why this code leads to error?

local f=io.open("testfile","w")[br] io.output(f) --Error "attempt to call nil" - Why? f contains data (table:7a86c)-- [br] io.write(...)[br] f:close()[br]