Forum Discussion

destruk's avatar
destruk
Streaming Star
14 years ago

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

2 Replies

  • renojim's avatar
    renojim
    Community Streaming Expert
    The path is wrong in the docs. Try:
    bslCore = ReadAsciiFile("common:/LibCore/v30/bslCore.brs")

    -JT