Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
Varscott11

Issue with requiring

Question

I've been getting into OS development both real and in Open Computers lately and while writing my kernel, I came across an issue that I cannot figure out. In my init.lua, I've put the following:

local GemKrnl = require("Sapphire.System.GemKrnl")
GemKrnl.EntryPoint()

This should jump into my kernel, but for some reason it comes back with "attempt to call global 'require' (a nil value). I've specified the directory that it can be found, so whats the problem here?

Also, one last thing, I suspect that if I want to use OpenOS apis, then I will need to include the files in my OS directory correct?

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

There is no require provided by the `computer`because there is no default "filesystem", but only filesystems provided by the filesystem components. That is why OpenOS defines require:

https://github.com/MightyPirates/OpenComputers/blob/master-MC1.7.10/src/main/resources/assets/opencomputers/loot/openos/lib/package.lua

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.