Here is the code
http://pastebin.com/ifgypV4A
and the thing it's writing:
This is a test.
The thing it outputs:
{}
Any solutions?
NOTE: Please ignore the P == "No". It's not encrypted due to the fact that I don't care if it's breached or not.
2
H.readAll() returning {} when written to it in the exact same program is something else
Started by Famous5000, May 21 2016 02:39 AM
utility api
7 replies to this topic
#1
Posted 21 May 2016 - 02:39 AM
#2
Posted 21 May 2016 - 02:55 AM
I can't find what line the problem is, but did you do H = fs.open("file","r")? With the "r" ?
#4
Posted 21 May 2016 - 08:07 PM
Dog, on 21 May 2016 - 03:08 AM, said:
I look inside the FS api, and the FS.Open computercraft wiki entries before I posted this. Nothing seemed to help me out.
I've tried using both : and ., with both failing to write.
Waitdev_, on 21 May 2016 - 02:55 AM, said:
I can't find what line the problem is, but did you do H = fs.open("file","r")? With the "r" ?
Edited by Famous5000, 21 May 2016 - 08:08 PM.
#5
Posted 21 May 2016 - 08:12 PM
I had this problem when saving an image to file, turns out I was using test:write instead of test.write, so I agree with Dog's comment.
Oh. thats weird =/
Quote
I look inside the FS api, and the FS.Open computercraft wiki entries before I posted this. Nothing seemed to help me out.
I've tried using both : and ., with both failing to write.
I've tried using both : and ., with both failing to write.
Edited by supernicejohn, 21 May 2016 - 08:15 PM.
#6
Posted 21 May 2016 - 08:26 PM
Famous5000, on 21 May 2016 - 08:07 PM, said:
I look inside the FS api, and the FS.Open computercraft wiki entries before I posted this. Nothing seemed to help me out.
I've tried using both : and ., with both failing to write.
I've tried using both : and ., with both failing to write.
Are you sure you changed all your write and read statements to use dot notation? How do you know nothing is being written? Are you viewing the written file directly with edit?
#8
Posted 22 May 2016 - 01:03 AM
Famous5000, on 21 May 2016 - 08:07 PM, said:
I've tried using both : and ., with both failing to write.
Dog's still right, though. You're getting "{}" because you incorrectly used colon notation when you wrote that particular file. You need to switch ALL your fs API interactions to dot notation.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users