Script error without line number

I made some changes (still analyzing what is wrong), and getting the following error without any line number:

Operator cannot be applied to these types

The following lines are causing it:

on ControlChangeEvent(ccMessage : ControlChangeMessage) from MidiInFcb1010
var		
   ccValue 			    : integer = GetCCValue(ccMessage)
   lowestLowerChannel   : string = "5678"
   x : integer
   
x = lowestLowerChannel - 1

String lowestLowerChannel is a string and the operation - 1 is not allowed for strings, the error is given correctly, however, the line is not shown (and the cursor jumps to the first line of the script).

Please add the line number :slight_smile:

Is this the complete script?

No, the entire script is > 500 lines :slight_smile:

This does not help me. I need to see the actual code in the GPScript editor window with the error (or lack thereof) shown there.

It’s just about the lack of the according line number within the error message…

You might use this as a test script:

Initialization
var		
   ccValue 			    : integer = 5
   lowestLowerChannel   : string = "5678"
   x : integer

   x = lowestLowerChannel - 1
End

On compile, you will get the error but you are not told in which line this happened.

If you’d add somewhere a faulty command like this (no capital “P”)

Initialization
var		
   ccValue 			    : integer = 5
   lowestLowerChannel   : string = "5678"
   x : integer

   print ("test")

   x = lowestLowerChannel - 1
End

and try to compile, you will get an error and you will also be told in which line the suspect is…

1 Like

Oh, I see.

The problem is with semantic errors (e.g. mismatched types) vs syntax errors.

Thank you…that’s something I can check

2 Likes

OK - this is fixed now — it was a legacy problem that just got lost

2 Likes

I was away but good to see it’s already fixed, thanks.