
Attempt to call a nil value (global 'require'); Drone Error
asian-mario opened this issue ยท 3 comments
Hello! I'm programming my first drone and flashed my bios.lua
to my EEPROM, the program worked perfectly fine on my computer while testing it but as soon as I assembled the drone and turned it on it gave me the error: bios:1: Attempt to call a nil value (global 'require')
I have no idea what's wrong since it worked on the computer, here is the 1st line of bios.lua:
local component = require("component")
this happens because require()
is apart of an os like openos and not apart of lua if you want to use a component without an os you do local i = component.proxy(component.list("<componentName>")())
Makes sense, but what about other libraries such as 'event' etc.
Couldn't seem to find an answer on the wiki (also I found out the solution to my original issue on the wiki, sorry about that).
you can only use the libraries listed here