kisuke
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2021
10:09 AM
import a brightscript into another brightscript
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?
2 REPLIES 2
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2021
05:17 PM
Re: import a brightscript into another brightscript
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.
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
ianhunter
Newbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024
06:45 AM
Re: import a brightscript into another brightscript
The `import` syntax is only available on Brighterscript.