LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure syntax error

Solved!
Go to solution

Hello Guys,

 

Please help me configure this error. Below is the code.

/*****************************FAIL Bit**********************************************/
void FailBoard (int x)
{
 char str[5];
 long i;
 
 if (GetBitFestoInputs(3,1)
 {
  GetCtrlVal(panelHandle_Cobot, PANEL_esFail, str);
  i = atol(str);
  i++;
  sprintf(str, "%lu", i);
  SetCtrlVal(panelHandle_Cobot, PANEL_esFail, str);
 }
 return;
}

 

I got an error syntax error: found '{'expecting')'

 

Thanks in advance.

0 Kudos
Message 1 of 4
(2,742 Views)
Solution
Accepted by Master_Viper

Hi Master_Viper,

the error message is quite clear: a closing parenthesis is missing; the complete message should list also list line and position of the error, which could help you to locate and solve it by yourself.

 

In any case, if the code is the one you posted the error should be this one (missing parenthesis highlighted in red):

 if (GetBitFestoInputs(3,1))
{

 



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(2,725 Views)

Sir Roberto,

Can I ask another question but different topic or do I need to create new topic.

 

Thanks,

Master_Viper

0 Kudos
Message 3 of 4
(2,714 Views)

If the new question has no relation with this topic it is better to open a new discussion.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 4
(2,639 Views)