- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Running the debugger on Visual Studio Code on a Roku channel I am creating and I am getting an Invalid value for left-side of expression error pointing at: screen = CreateObject("roSGScreen")
Here is the debugger output and main.brs code. Very new to this and would appreciate some help.
Output:
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error message is actually complaining about line 4:
Invalid value for left-side of expression. (runtime error &he4) in pkg:/source/main.brs(4)
I don't think you are allowed to completely reassign m.top.global. so try doing m.top.global.api_key = "AIzaSyCn9WZzbJdT7XsQOuLYv-kQNmCFbUQ2jQI"
m.top.global.youTubeApiBaseUrl = "https://www.googleapis.com/youtube/v3"
Also, m.top.global.might not be assigned at that phase.of the app. So it might still fail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error message is actually complaining about line 4:
Invalid value for left-side of expression. (runtime error &he4) in pkg:/source/main.brs(4)
I don't think you are allowed to completely reassign m.top.global. so try doing m.top.global.api_key = "AIzaSyCn9WZzbJdT7XsQOuLYv-kQNmCFbUQ2jQI"
m.top.global.youTubeApiBaseUrl = "https://www.googleapis.com/youtube/v3"
Also, m.top.global.might not be assigned at that phase.of the app. So it might still fail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Need Help screen getting Invalid value for left-side of expression error
Thanks so much, fixed the error and you were right, it doesn't seem like it has been assigned so there was a failure. Will work on it some more. Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Need Help screen getting Invalid value for left-side of expression error
m.global isn't available in the main thread by default. We usually do something like this in our apps
sub main()
...stuff
screen = createObject("roSGScreen")
m.global = screen.getGlobalNode()
...more stuff
end sub