mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-13 01:10:19 -04:00
updated info for autorun to include require
parent
67f8dc36d7
commit
d8fdb1e9ed
@ -21,8 +21,8 @@ Now, computers do not store any state across reboots. Meaning if you shut down o
|
||||
Switch into your freshly mounted folder, and run `edit autorun.lua`.
|
||||

|
||||
|
||||
Autorun scripts get the address of the storage medium they're on as their first parameter, so we can use Lua's varargs syntax to access it. We'll pass that to the `fs.mount()` function, which you find documented in [[the file system API|API/FileSystem]].
|
||||

|
||||
Autorun scripts get the proxy of the storage medium they're on as their first parameter, so we can use Lua's varargs syntax to access it. We'll pass that to the `fs.mount()` function, which you find documented in [[the file system API|API/FileSystem]].
|
||||

|
||||
|
||||
Save that file and close it. After removing the hard disk from the computer and inserting it again, run `ls` and you should see the disk has been automatically mounted again.
|
||||

|
Loading…
x
Reference in New Issue
Block a user