ssaguiar
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2022
06:30 AM
Can I set a boolean global variable?
Hi to all.
I am developing a channel for our firm and am having some question (a lot of them).
One of these questions is if I can create a global boolean variable.
I am able to create string global variables this way:
m.global = m.screen.getGlobalNode()
m.global.id = "GlobalNode"
m.global.addField("TOKEN", "string", true)
then, I write to the variable:
m.global.TOKEN = "09834934539"
and read it, in any scene:
token = m.global.TOKEN
This works fine, but it seems that I can't use something to use global boolean variables as:
m.global.addField("AUTHENTICATED", "boolean", true)
then set it:
m.global.AUTHENTICATED = true
and read it:
isauthenticated = m.global.AUTHENTICATED
Is this the correct way or I am wrong?
Thanks for any clue about it.
1 REPLY 1
xoceunder
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2022
12:37 PM
Re: Can I set a boolean global variable?
Yes is corect use