Harrikan Posted April 24, 2015 Share Posted April 24, 2015 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 botder Posted April 24, 2015 MTA Team Share Posted April 24, 2015 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
Harrikan Posted April 24, 2015 Author Share Posted April 24, 2015 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now