novo Posted March 10, 2013 Posted March 10, 2013 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.
PaiN^ Posted March 10, 2013 Posted March 10, 2013 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 ..
Castillo Posted March 10, 2013 Posted March 10, 2013 Well, I tested your code and it works perfectly.
novo Posted March 10, 2013 Author Posted March 10, 2013 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?
Castillo Posted March 10, 2013 Posted March 10, 2013 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.
novo Posted March 10, 2013 Author Posted March 10, 2013 No, I'm checking the client downloaded files and I can't see the file I'm creating.
PaiN^ Posted March 10, 2013 Posted March 10, 2013 I don't know if you noticed, but the file name is :resource .. Do you know about that " : " .?
Castillo Posted March 10, 2013 Posted March 10, 2013 ":" is used to create/use files to/from another resources.
PaiN^ Posted March 10, 2013 Posted March 10, 2013 ":" is used to create/use files to/from another resources. Didn't know that, Thanx ..
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