Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
adrianc1982
Level 7

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
adrianc1982
Level 7

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
Level 7

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