Code:
http://imgur.com/svWE28a
Line 9 is the one giving the error.
Don't neglect to close your file handles (eg "h") when you're done with them. You may also have a handle persisting on the local "temp" file, in which case rebooting the computer should clear it.
Yes, it's still access denied on line 9.And should I assume you're getting the same error on the same line?
Alright, what's fs.getFreeSpace("") returning?
To close your file, which you need to do if moving or deleting the file thats open you would do thisYes, it's still access denied on line 9.And should I assume you're getting the same error on the same line?
Alright, what's fs.getFreeSpace("") returning?
The space is:
997976
Edit: Something that may be worth saying, when I run the program, it copies the file onto the computer BUT doesn't move it from the disk to the computer. So, basically, it's copy with an error.
local h = fs.open( AlocatedFile, "r")
local j = h.readLine() --# you dont have to declare a line number
h.close() --# this will close the file allowing you to do what you want to do IE: move the file
Don't neglect to close your file handles (eg "h") when you're done with them. You may also have a handle persisting on the local "temp" file, in which case rebooting the computer should clear it.
A bit late. Of course he might of done it wrong, but still a bit late :P/>To close your file, which you need to do if moving or deleting the file thats open you would do thislocal h = fs.open( AlocatedFile, "r") local j = h.readLine() --# you dont have to declare a line number h.close() --# this will close the file allowing you to do what you want to do IE: move the file
Always remeber to close the file after you have read the lines you need or you will always get "Access Denined"
Hope this works :P/>
I mean reboting the computer ever time to solve the issue isnt a effective way of sorting it out, hence why i posted what i postedDon't neglect to close your file handles (eg "h") when you're done with them. You may also have a handle persisting on the local "temp" file, in which case rebooting the computer should clear it.A bit lateTo close your file, which you need to do if moving or deleting the file thats open you would do thislocal h = fs.open( AlocatedFile, "r") local j = h.readLine() --# you dont have to declare a line number h.close() --# this will close the file allowing you to do what you want to do IE: move the file
Always remeber to close the file after you have read the lines you need or you will always get "Access Denined"
Hope this works :P/>
To close your file, which you need to do if moving or deleting the file thats open you would do thislocal h = fs.open( AlocatedFile, "r") local j = h.readLine() --# you dont have to declare a line number h.close() --# this will close the file allowing you to do what you want to do IE: move the file
Always remeber to close the file after you have read the lines you need or you will always get "Access Denined"
Hope this works :P/>
and it is still syaing the is a error on line 9, i have read thought the code mulitple times and cant seam to see what the problem is at all!I am well aware of this, I've closed it when Bomb Bloke said something. However, it's still not working.
and it is still syaing the is a error on line 9, i have read thought the code mulitple times and cant seam to see what the problem is at all!I am well aware of this, I've closed it when Bomb Bloke said something. However, it's still not working.
Could you post the rest of your code or upload it to pastebin and give the link just so i can read though everything?