Is it possible to import a brightscript into another brightscript?
Following the example of https://npm.io/package/roku-log I created a MyFile.brs inside the source folder and tried to import it into another .brs file using:
import "pkg:/source/MyFile.brs"
gives the error: "Syntax error. (compilation error & h02)".
Can you help?
There is no "import" in BrightScript that I'm aware of. I tried to follow that example, but gave up quickly. He's using some kind of package manager that I've never heard of. The fact that he states "in you .bs file, import..." makes me think he's not importing into a BrightScript source file. What's a ".bs" file? BrightScript has always used .brs and I don't believe that's just a typo.
The `import` syntax is only available on Brighterscript.
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. You will not be able to log in or post new comments or kudos during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 12 and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
Thanks for your patience — we’re excited to share what’s next!