I have created a new project. Also, I have tried to do what you say with the @ in front of lines, however, when the error occurs all the code in the entire project is wiped and the project will not save the code anymore. At this point I must delete that project, copy my blank template project and then paste all the code back into the places where it goes to try again.
It's odd though, because the code will run if I put it in a little at a time, but as soon as all of the code is in it gives me the error. I've started at the beginning of my code and pasted in a little at a time and it runs fine until the entire code is in. I've started from the end and gone to the beginning of the code and it runs fine until the beginning is added. I would think if it were a syntax error of some sort it wouldn't run as soon as that part of the code was put in.
Perhaps I can explain what my code is doing and show you the general format I'm using for it and see if I can get opinions on what might be going on?
I have five groups of 6 buttons that start unpressed but when the user presses them they stay pressed with the following code in the Start Up of the main card:
ButtonSetType(X, 0)
ButtonSetValue(X, 0)
where x is 1-30 for each button.
I then have a button which is set to first make the value of some variables 0, then take the values of the buttons and add them to a variable, like so:
Put '0' into charX
Put ButtonValueFN(X) into chYdotX
So, the 3rd button in the first group will look like:
Put ButtonValueFN(3) into ch1dot3
Then I have code which assigns a value to each button's result (either pushed or unpushed) and adds it to the charx variable.
If ch1dot1>0 Then
add '100000' to char1
EndIf
If ch1dot2>0 Then
add '20000' to char1
EndIf
If ch1dot3>0 Then
add '3000' to char1
EndIf
If ch1dot4>0 Then
add '400' to char1
EndIf
If ch1dot5>0 Then
add '50' to char1
EndIf
If ch1dot6>0 Then
add '6' to char1
EndIf
And then that repeats for each group. After that, the button runs a MainCode Process:
Call Search
Search has code which compares the value of charX to a value to determine what text to display in different fields:
If char1='000006' Then
Put 'Something' into field 1
Put 'Explanation.' into field 2
Put ' ' into field 3
Put ' ' into field 4
Put ' ' into field 5
Put ' ' into field 6
Put ' ' into field 7
Put ' ' into field 8
Put ' ' into field 9
Put ' ' into field 10
EndIf
This final part of the code is the part that I believe is causing issues. I have thousands of these segments for different values of char1 and char2 (I haven't gotten to char 3 yet, since I can't get char2 to work with char1). Most recently I tried to cut the code up into smaller sections (as mentioned in previous posts) by using:
If char2 = 0 AND char3 = 0 AND char4 = 0 AND char5 = 0 then
Call Search
If char1 > 0 AND char1 < 7 AND char2 > 0 AND char3 = 0 AND char4 = 0 AND char5 = 0 then
Call Search2
etc.
This worked fine until all of the code was added into Search1-9. At this point I got the error I mentioned before.
Not sure if any of this will help, but thought I might as well share and see what I get