Jump to content

Problem with fileClose


Bonsai

Recommended Posts

Hey Peeps,

whenever I create or open a file, I close it after everything is done by fileClose.

But as long as I don't restart/stop the responsible resource, its not possible to delete the file in its folder.

local newFile = fileCreate(file.path) 
fileWrite(newFile, file.data) 
fileClose(newFile) 

E.g. something like that. The new created file is still active in some way.

Am I doing something wrong?

Bonsai

Link to comment
I remember seeing this reported on the bugtracker but I can't seem to find it now. You're not doing anything wrong since you simply create and close the file. Try fileDelete in a script instead.

Yeah, the actual problem is fileDelete says its unable to delete file.

I was wondering why so I tried to delete it in its folder.

There it shows a file in use by gta_sa.exe message. Only restarting the resource is stopping this.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...