Developers

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!
Tags (1)
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..
Tags (1)
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
Tags (1)
0 Kudos
Community is Being Upgraded!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

We're sorry for this disruption — we’re excited to share what’s next!