S Simontelescopium Member Licensed User Oct 20, 2009 #1 Hi I am trying to compile a prog. and get the error Error compiling program. Error message: error CS1525: Invalid expression term ';' Line Number: 43 Line AddLabel("systeminfo","labPname",5,currentheight,470, sizeoffont+10) programs runs fine just can't compile these are the relevant bits of the code... B4X: 41: sizeoffont= 18 42: currentheight=140 43: AddLabel("systeminfo","labPname",5,currentheight,470,sizeoffont+10) from the error I was expecting to find ';' in the code on line 43 but it is not there, so I am stuck as to what to do... Any help really appreciated...
Hi I am trying to compile a prog. and get the error Error compiling program. Error message: error CS1525: Invalid expression term ';' Line Number: 43 Line AddLabel("systeminfo","labPname",5,currentheight,470, sizeoffont+10) programs runs fine just can't compile these are the relevant bits of the code... B4X: 41: sizeoffont= 18 42: currentheight=140 43: AddLabel("systeminfo","labPname",5,currentheight,470,sizeoffont+10) from the error I was expecting to find ';' in the code on line 43 but it is not there, so I am stuck as to what to do... Any help really appreciated...
klaus Expert Licensed User Longtime User Oct 20, 2009 #2 If you look at the help file for AddLabel: Adds a Label to a Form or to a Panel at runtime. Syntax: AddLabel (Form | Panel, Name, Left, Top, Width, Height, Text) Example: AddLabel ("pnlOptions"," Label1", 5, 5, 40, 20, "Option:") Click to expand... You are missing the last parameter, the text of the label. Your line should look like: B4X: 43: AddLabel("systeminfo","labPname",5,currentheight,470,sizeoffont+10,"") Even if there is no text in the label you must add the 2 Quotes. Best regards.
If you look at the help file for AddLabel: Adds a Label to a Form or to a Panel at runtime. Syntax: AddLabel (Form | Panel, Name, Left, Top, Width, Height, Text) Example: AddLabel ("pnlOptions"," Label1", 5, 5, 40, 20, "Option:") Click to expand... You are missing the last parameter, the text of the label. Your line should look like: B4X: 43: AddLabel("systeminfo","labPname",5,currentheight,470,sizeoffont+10,"") Even if there is no text in the label you must add the 2 Quotes. Best regards.
S Simontelescopium Member Licensed User Oct 20, 2009 #3 Brilliant thanks - I was adding the text a few lines later - I would really expect this to give an error when running in interpreter mode. I really appreciate your help
Brilliant thanks - I was adding the text a few lines later - I would really expect this to give an error when running in interpreter mode. I really appreciate your help