Start a new topic

Conditional Statements " if "

  Hi Team,

on your Nextion_Instruction_Set page, is this command what I need for a button:

 

if(b0.txt==”1”
{    
  b0.txt==”2”  
} else if (b0.txt==”2” )
{ 
  b0.txt==”3”  
}else
{ 
  b0.txt==”1”
}

 BUT: when i compile, I have error.


Error: SYNTAX ERROR: "if" statement must end with ")":if(b0.txt==”1”( Double click to jump to code)

 I try to put ) in different places but not work!
  
Can you correct this or how can I do it?


this works
if(b0.txt==”1”)
{
  b0.txt=”2”
}else if(b0.txt==”2”)
{
  b0.txt=”3”
}else
{
  b0.txt=”1”
}

 


2 people like this

Thank you tolisn, work nice now !


 It seems Instruction_Set have many errors...
Great device , but poor support or example from itead, they not realize if help us to create examples, and app, many others buy this display.

  all the best !


1 person likes this
Login or Signup to post a comment