Jump to content




Access Denied


  • You cannot reply to this topic
5 replies to this topic

#1 Hydrotronics

  • Members
  • 131 posts
  • LocationThe hall of 1000 monkeys and only 1 typewriter

Posted 20 December 2015 - 03:14 PM

Well, this is quite a basic thing.
I'm trying to make a temporary file but whenever I try to delete it, it gives me Access Denied

Why is this?

Code:

if fs.exisits("test") then
  fs.delete("test") -- Where it says Access Denied
  file = fs.open("test","w")
  file.writeLine('shell.run("CTest")')
  file.close()
else
  file = fs.open("test","w")
  file.writeLine('shell.run("CTest")')
  file.close()
end


#2 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 20 December 2015 - 03:36 PM

Are you using an OS or anything that might modify the fs API on your computer? If not, my best guess is it's a non-CC issue with file permissions on your IRL computer.

#3 Admicos

  • Members
  • 207 posts
  • LocationTurkey

Posted 20 December 2015 - 03:37 PM

View PostHydrotronics, on 20 December 2015 - 03:14 PM, said:

if fs.exisits("test") then
it should be exists

Edited by Admicos, 20 December 2015 - 03:39 PM.


#4 Hydrotronics

  • Members
  • 131 posts
  • LocationThe hall of 1000 monkeys and only 1 typewriter

Posted 20 December 2015 - 03:39 PM

no API changes, and my computer file perms were set so computercraft could do stuff

View PostAdmicos, on 20 December 2015 - 03:37 PM, said:

View PostHydrotronics, on 20 December 2015 - 03:14 PM, said:

if fs.exisits("test") then

it should be exists
yes i know, i hand typed it in and i wasn't paying much attention. in the actual code it is like that :P

#5 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 20 December 2015 - 03:41 PM

The only other thing I can think of is the file being open already. If you open a file and do not close the handle, no program will be able to use that file until the computer is rebooted.

#6 Hydrotronics

  • Members
  • 131 posts
  • LocationThe hall of 1000 monkeys and only 1 typewriter

Posted 20 December 2015 - 03:43 PM

View PostKingofGamesYami, on 20 December 2015 - 03:41 PM, said:

The only other thing I can think of is the file being open already. If you open a file and do not close the handle, no program will be able to use that file until the computer is rebooted.
yeah thx! that actually was the case XD. I rebooted and it sorted itself out :)

Edited by Hydrotronics, 20 December 2015 - 03:44 PM.






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users