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

Negation

I'm really sorry if this is a very stupid question, but I'm frustrated by now.
Is it possible to negate a condition in brightscript?

I've tried these without any luck:
if(not var)
if(+var)
if(-var)
if(!var)


Is there a way to do this?
It is really frustrating having to use the following just because I want to negate the condition:
if(foo)
(empty)
else
something
end if
0 Kudos
1 REPLY 1
RokuJoel
Binge Watcher

Re: Negation

played=true
if not played then
screen.addbutton(0,"play")
else
screen.addbutton(1,"replay")
end if
0 Kudos