Jump to content

[?] fileCreate


Recommended Posts

I have written a simple script:

    local hFile = fileOpen("pos.txt", false)       -- open the file 
    if hFile then                                  -- check if it was successfully opened 
        writePos(thePlayer, comment) 
        hFile = fileCreate("pos.txt")              -- create a new file 
        writePos(thePlayer, comment) 

Then I have tried it and received:

ERROR: fileOpen; unable to load file

ERROR: fileCreate; unable to load file

Why it doesn't create a new file?

Link to comment

I believe I answered you in #mta.scripting, but I'll put the answer here so everyone sees it. fileOpen and fileCreate don't work inside zipped up resources in dp1. That's fixed in dp2. For now extract the resource to a folder.

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