Baffling error message lazarus / 62-General ---------------------------------------------------------------------- peardox · 2021-05-23 09:13 Well, at least its baffling to me... Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i const  {$if defined(windows)}  FSPrefix: String = 'C:';  {$endif}  {$if defined(linux)}  FSPrefix: String = 'file:/home/simon';  {$endif}  {$if defined(darwin)}  FSPrefix: String = 'file:/Users/simon';  {$endif}  ModelFile: String = FSPrefix + PathDelim + 'Assets' + PathDelim + 'GreenDragon.glb'; Error: Illegal expression ---------------------------------------------------------------------- Bart · 2021-05-23 10:04 Since the constanst you define are in effect initialize variables, you cannot use them to build other constants at design time. Just skip the ": string" part for FSPrefix (and perhaps also in ModelFile, unless you need to change that at runtime) in the declaration. The compiler knows that '/foo' is a string ;-) This should do: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     const    {$if defined(windows)}      FSPrefix = 'C:';      {$endif}      {$if defined(linux)}      FSPrefix = 'file:/home/simon';      {$endif}      {$if defined(darwin)}      FSPrefix = 'file:/Users/simon';      {$endif}      ModelFile: String = FSPrefix + PathDelim + 'Assets' + PathDelim + 'GreenDragon.glb'; Bart