I'm trying use a simple static array in my script. In trying to track down the exact cause of the error, I reduced my script to one line: the dim statement. Even this gets the error: "No variable given for "Dim","Local","Global" or "Const" statement.
This occurs even when I cut and paste the exact example given in the online documentation:
Dim $Array1[12]=[3, 7.5, "string"]
(For the record, I've also tried to simplify this by using Dim $array[3]=[1,2,3] and several other super simple arrays. But I still get this error every time.) Just to add another curveball, I tried using Dim Const $Array1[3]=[1,2,3]. This gives a different error message: Expected a "=" operator in the assignment statement, with the caret pointing to the subscript bracket. This would make sense if AutoIT3.exe thought I were Dimming a scalar... but I want an array!
It seems to me that maybe the documentation is wrong here, otherwise cutting and pasting ought not to produce this error. What's the correct syntax here? Or am I missing something obvious?