10 posts
Posted 21 May 2016 - 03:39 AM
Here is the code
http://pastebin.com/ifgypV4Aand 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.
818 posts
Location
Wherever you want me to be
Posted 21 May 2016 - 03:55 AM
I can't find what line the problem is, but did you do H = fs.open("file","r")? With the "r" ?
1220 posts
Location
Earth orbit
Posted 21 May 2016 - 04:08 AM
Well, I noticed on lines 42, 45 and 56 you're using colon notation where you should probably be using dot notation. e.g….
Tr = D.readAll()
Take another look as the
fs api (specifically
fs.open) and double check all your read and write calls.
10 posts
Posted 21 May 2016 - 09:07 PM
Well, I noticed on lines 42, 45 and 56 you're using colon notation where you should probably be using dot notation. e.g….
Tr = D.readAll()
Take another look as the
fs api (specifically
fs.open) and double check all your read and write calls.
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 can't find what line the problem is, but did you do H = fs.open("file","r")? With the "r" ?
Yes I did.
Edited on 21 May 2016 - 07:08 PM
101 posts
Location
Sweden
Posted 21 May 2016 - 09: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.
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.
Oh. thats weird =/
Edited on 21 May 2016 - 07:15 PM
1220 posts
Location
Earth orbit
Posted 21 May 2016 - 09:26 PM
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.
Well, if you take a closer look at the wiki you will notice that all the examples use dot notation, not colon notation
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?
1080 posts
Location
In the Matrix
Posted 21 May 2016 - 09:29 PM
7083 posts
Location
Tasmania (AU)
Posted 22 May 2016 - 02:03 AM
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.