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
keep getting errors
Started by shiva_chirr, Dec 13 2014 08:26 AM
4 replies to this topic
#1
Posted 13 December 2014 - 08:26 AM
#2
Posted 13 December 2014 - 10:27 AM
Its's os.shutdown() and os.reboot(). Next time please post the error message you get.
#3
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.
They don't need any arguments.
#4
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
I am interested to know if the knowledge you applied to this program was self-taught?
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 by theoriginalbit, 13 December 2014 - 12:38 PM.
#5
Posted 15 December 2014 - 12:00 AM
theoriginalbit, on 13 December 2014 - 12:38 PM, said:
i am interested to know if the knowledge you applied to this program was self-taught?
yes im self taught
TheOddByte, on 13 December 2014 - 11:45 AM, said:
And why are you adding term.native() as an argument for os.reboot() and os.shutdown() ?
They don't need any arguments.
They don't need any arguments.
im slowly learning
------
also ill remeber to post the erro msgs next time and this
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











