Jump to content

fileCreate Client-sided Problems


novo

Recommended Posts

Posted

Hello,

I want to create a file in client-side on a defined resource (:resource/file.txt) but it's not working, here you can see my code:

fileWrite says bad file pointer, the file isn't being created.

  
local file = fileCreate(":resource/file.txt") 
if file then 
fileWrite(file, "H") 
fileClose(file) 
end 
  

Thanks in advance.

Posted

Are you sure you got a file called :resource in your resource ..?

And make sure your resource is saved as a folder and not .zip ..

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted

Well, I tested your code and it works perfectly.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Yes, there's a folder/resource called "resource" in my resources folder.

It's a folder.

It's not working for me Solid, maybe it's because I'm having the resource in [] sub-folders?

Posted

You are checking on your server resources folder? because if you are doing that, then you are checking the wrong path, it's on the downloaded client folder.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Well, here it created it just fine.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I don't know if you noticed, but the file name is :resource ..

Do you know about that " : " .?

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted

":" is used to create/use files to/from another resources.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
":" is used to create/use files to/from another resources.

Didn't know that, Thanx ..

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

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