Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
destruk
Streaming Star

bslCore - Brightscript Reference

4.12 Script Libraries
In addition to the platform BrightScript components discussed in Section 4.1, BrightScript 3.0 enables Script Libraries to be used in your scripts. The BrightScript libraries are .brs files, that are provided by the BrightScript platform or you can provide. They can be included in your source files with the new “Library” keyword. Libraries are searched for in pkg:/ folder and then the system library path. On the Roku Streaming Player, the system library path is “common:/LibCore”.
Example
Library "v30/bslCore.brs"
Those interested in the contents of the library files, can view the source on their debug console:
BrightScript> bslCore = ReadAsciiFile("common:/LibCore/1.0/bslCore.brs")
BrightScript> print bslCore


This doesn't work
0 Kudos
2 REPLIES 2
renojim
Community Streaming Expert

Re: bslCore - Brightscript Reference

The path is wrong in the docs. Try:
bslCore = ReadAsciiFile("common:/LibCore/v30/bslCore.brs")

-JT
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.
0 Kudos
destruk
Streaming Star

Re: bslCore - Brightscript Reference

Thanks RenoJim! That works.
0 Kudos