Jump to content

fileCreate Limit


Harrikan

Recommended Posts

Good evening dear Community.

I excuse my bad english, but our english-teacher was not the best ^_^

My question: fileCreate does not create more then 506 files and that is going to be a problem for my project.

I need to create more files, because I need Images, that I wants to create with that function.

So: How could I create more then 506 files, that I also can use them..

Error: file Error: @fileCreate [unable to create "pfad"]

I tried to create the files in a loop as a test:

for i = 1,1000 do

createFile("blub"..i..".txt")

end

but it failed after the 506 files.

I really hope, that anybody could help me with the problem ^^

With greets: Harrikan

Link to comment
  • MTA Team

IIRC the developers of MTA added a protection against opening too many files per resource.

You have to close the handle after creating the file.

local handle = fileCreate("something.txt") 
if handle then 
    fileClose(handle) 
end 

Link to comment

Haha Thank you realy much..

I found my mistake now.

local file = fileCreate("FILEPATH") 
            file = fileOpen("FILEPATH", false) 
            fileWrite( file, tab[i][i1] ) 
            fileClose(file) 

If the Script creates a file, itis open it at the same time.. So my fileOpen was useless

Thank you really much ^^

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...