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: 
hugetv
Visitor

help this error

    jsonAsString = CreateObject("roUrlTransfer")
jsonAsString.SetURL("http://"+initConfig()+"/RokuDev/season.php?cve=10&Series=season 1")
json = ParseJson(jsonAsString.GetToString())
return json.Capitulos


Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in pkg:/source/Series/PosterScreen.brs(53)

this error spache for season 1
Our system http://www.rokumanager.com
0 Kudos
1 REPLY 1
RokuKC
Roku Employee
Roku Employee

Re: help this error

"hugetv" wrote:
    jsonAsString = CreateObject("roUrlTransfer")
jsonAsString.SetURL("http://"+initConfig()+"/RokuDev/season.php?cve=10&Series=season 1")
json = ParseJson(jsonAsString.GetToString())
return json.Capitulos


Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in pkg:/source/Series/PosterScreen.brs(53)

this error spache for season 1


For debugging purposes, you could break up your code into steps and verify each step.
E.g.

jsonAsString = CreateObject("roUrlTransfer")
jsonAsString.SetURL("http://"+initConfig()+"/RokuDev/season.php?cve=10&Series=season 1")

data = jsonAsString.GetToString()
print "Data: "; data
' did the data download succeed? if not, and it is empty or not JSON, ParseJSON is going to fail...

json = ParseJson(data)
print "JSON: "; json
' did the JSON parse successfully and return an object, or is it invalid?
' and does if have a Capitulos field as expected?

return json.Capitulos
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.