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

Scene Graph roString to Integer help

Im trying to convert a roString in Scene Graph to Integer i've tried int(myRoString) and myRoString.ToInt() but both of them i get type mismatch.

here the error

Type Mismatch. (runtime error &h18) in pkg:/components/epgGrid.brs(48)

048:                 duration = int(m.jsonReaderResultLiveTv[id].epg[id1][3])

type(m.jsonReaderResultLiveTv[id].epg[id1][3])  roString


i did a print "type(string)"; type(string) so you could see that it is indeed a roString. Im lost here, ive done this kind of casting and converting strings all the time, help!
0 Kudos
2 REPLIES 2
adrianc1982
Visitor

Re: Scene Graph roString to Integer help

Sorry guys i figured it out. I converted the roString toFloat() and from there i could convert to string. I dont know if its a bug but it works.. Thanks..
0 Kudos
adrianc1982
Visitor

Re: Scene Graph roString to Integer help

okay i found my error, my integer is 10 digits long so I needed to cast longinteger. Got my answer here:

https://forums.roku.com/viewtopic.php?f ... er#p535826
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.