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

Print display and release 3.0

This display used to work ???

play = 0
mode = 0
loop = 0
? "Buttons 1 play " play " mode " mode " loop " loop

Now I get an invalid on 'mode' ???

I split it up into:
? "Buttons 1 play " play
? " mode " mode
? " loop " loop

Mode still fails ???
Use of uninitialized variable. (runtime error &he9) in ...AAIbHJ05/pkg:/source/Main.brs(87)

087: ? "Buttons 1 play " play " mode " mode " loop " loop

Local Variables:
param &h0010 bsc:roAssociativeArray, refcnt=2
global &h0020 rotINTERFACE:ifGlobal
m &h0010 bsc:roAssociativeArray, refcnt=2
play &h0002 Integer val:0
mode &h0002 Integer val:0
loop &h0002 Integer val:0
0 Kudos
3 REPLIES 3
RokuMarkn
Visitor

Re: Print display and release 3.0

According to 5.13 in the language reference, the items in a print statement "may be separated by commas or semi-colons". You're using spaces. I agree that the error message could be clearer.

--Mark
0 Kudos
greubel
Visitor

Re: Print display and release 3.0

It has been working for over a year. I noticed in one of the samples that a space was used as a separator. Using spaces makes the display more readable in the code. I have this all over my code and this is the only one that fails. It has something to do with "mode" either in the string or the object.

True if I remove the spaces and replace them with either commas or semicolons, it works.
0 Kudos
RokuMarkn
Visitor

Re: Print display and release 3.0

You're right, it has something to do with the name "mode". It seems to be getting the first three letters confused with the "MOD" operator in some cases. We'll look into this.

--Mark
0 Kudos