About 10 years ago I used to program in BASIC-type languages but I have forgotten most of it since I have mostly moved onto C/C++.
I'm sure this is some type of syntax error but to me the logic seems at least mostly correct.
Here is the code that is producing the error "Array variable subscript badly formatted".
The foul is on the line that says: MouseClick("left", $Spot[$i][0], $Spot1[$i][1], 1, 0)
Global $Spot[8]
GetCoords()
Func GetCoords()
Local $i
For $i = 0 to 7 Step 1
While Not _IsPressed(71)
ToolTip("Please hover over the position and hit [F2]!", 0, 0, $Title)
$Spot[$i] = MouseGetPos()
WEnd
Sleep(500)
Next
StartTasks()
EndFunc
Func StartTasks()
ToolTip("Program Running, press [End] to terminate", 0, 0, $Title)
Local $i
For $i = 0 to 7 Step 1
While $toggle = 0
MouseClick("left", $Spot[$i][0], $Spot1[$i][1], 1, 0)
Opt("MouseClickDownDelay", 200)
Sleep(2000)
$toggle = 1
MouseClick("left", 308, 875, 1, 0)
Opt("MouseClickDownDelay", 200)
Sleep(2000)
WEnd
$toggle = 0
Next
Any help will be greatly appreciated!