11 posts
Posted 27 May 2012 - 11:25 AM
Hi,
I'm new to Lua so i need some help:
- Is it possible to create/read/write files?
- where can i get a list of all commands for computercraft?
Thanks!
34 posts
Posted 27 May 2012 - 12:06 PM
Type help into you minecraft computer. Most information is there.
11 posts
Posted 27 May 2012 - 12:12 PM
Okay, thanks. I didn't find anything about creating a file .. is this possible?
34 posts
Posted 27 May 2012 - 12:13 PM
Do you mean making a program, or do you already have a program and want to make that program write another program?
11 posts
Posted 27 May 2012 - 12:24 PM
no, i want to save some data, because when i save something in a variable and then reboot the computer its gone.
34 posts
Posted 27 May 2012 - 12:31 PM
You'll have to write it in a program, as far as I know.
11 posts
Posted 27 May 2012 - 12:42 PM
Ok.
Do you know how to edit the startup file? everytime i get "acess denied"
445 posts
Posted 27 May 2012 - 01:03 PM
You don't edit the startup file in the rom, you just make you own in the base folder
11 posts
Posted 27 May 2012 - 01:16 PM
oh :)/>/>
thanks a lot
1604 posts
Posted 27 May 2012 - 03:27 PM
To create files just open them in write mode:
local file = fs.open("path", "w")
It would create the file if it doesn't exist or delete it's contents and open it.