Start a new topic

Problem with if statement

 Hi,

for a Touch Area I wrote the following code into the Release Event and it works (va0 is a variable of type Number):


va0.val=va0.val+1
t1.txt="0"

 Why does the following not work?

if (va0.val<2)
{
va0.val=va0.val+1
t1.txt="0"
}

 Compiler gives the message:


Error: Invalid command:if (va0.val<2)( Double click to jump to code)
Error: SYNTAX ERROR: Extra "{":{( Double click to jump to code)

 

Has anybody an idea? (I use Nextion Editor V0.46)


Thanks,

Guenter


Nextion Instruction Set has a couple of typos each version

I do not have edit ability it or I would have fixed it in if statement

List in Grammatical Errors, and Document Corrections.


Use no space in if(  line.


Thank you, That's it, no space!!!

Guenter

Login or Signup to post a comment