Difference between revisions of "Talk:IO (API)"
From ComputerCraft Wiki
| (5 intermediate revisions by 2 users not shown) | |||
| Line 3: | Line 3: | ||
it's kinda useless to say that features are trimmed down, if there's no list. | it's kinda useless to say that features are trimmed down, if there's no list. | ||
[[User:Graypup|Graypup]] 01:57, 21 June 2012 (UTC) | [[User:Graypup|Graypup]] 01:57, 21 June 2012 (UTC) | ||
| + | |||
| + | ==Why this code leads to error?== | ||
| + | |||
| + | local f=io.open("testfile","w")<br> | ||
| + | io.output(f) <i> --Error "attempt to call nil" - Why? f contains data (table:7a86c)-- </i><br> | ||
| + | io.write(...)<br> | ||
| + | f:close()<br> | ||
| + | |||
| + | * Use ''file'':write() | ||
Latest revision as of 18:34, 18 November 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")
io.output(f) --Error "attempt to call nil" - Why? f contains data (table:7a86c)--
io.write(...)
f:close()
- Use file:write()