3 posts
Posted 13 December 2014 - 08:26 AM
im trying to make a boot setup for a computer were it can only boot of a drive or a drive network and im haveing issues with the shutdown code any ideas.
Pastebin ID: qUU1FkaR
1140 posts
Location
Kaunas, Lithuania
Posted 13 December 2014 - 10:27 AM
Its's os.shutdown() and os.reboot(). Next time please post the error message you get.
1852 posts
Location
Sweden
Posted 13 December 2014 - 11:45 AM
And why are you adding term.native() as an argument for os.reboot() and os.shutdown() ?
They don't need any arguments.
7508 posts
Location
Australia
Posted 13 December 2014 - 12:38 PM
As stated by MKlegoman357 it is advised that you post your error messages that way we can provide assistance faster, luckily this was an easy to assess issue.
To extend upon the answers the others have given, line 12
if disk == true then will always be false as
disk is an API, which is a table; a table is never a boolean. I believe what you meant was to use line 10 on line 12 like so
if disk.isPresent("drive_1") then
--# disk found
else
--# disk not found
end
which also brings up another issue,
disk.isPresent requires a side or network name for the disk drive, "BootDrive" is not valid for either of these, instead you must use "drive_1" as I have in the above example.
I am interested to know if the knowledge you applied to this program was self-taught?
Edited on 13 December 2014 - 11:38 AM
3 posts
Posted 15 December 2014 - 12:00 AM
i am interested to know if the knowledge you applied to this program was self-taught?
yes im self taught
And why are you adding term.native() as an argument for os.reboot() and os.shutdown() ?
They don't need any arguments.
im slowly learning
——
also ill remeber to post the erro msgs next time and this