I am trying to add data to an array and I keep getting the error "Subscript used on non-accessible variable ".
#include <array.au3>
; Includes, etc
~
~
~
Local $aOptionsArray[3]
$aOptionsArray = CheckboxesAndRadioButtons()
_ArrayDisplay($aOptionsArray)
Func CheckboxesAndRadioButtons()
; Create Checkboxes and Radio Buttons and read the results
~
~
~
; Radio Buttons to Array
; $aOptions[0] = $bTestSelectForever
; $aOptions[1] = $bTestSelect3Times
; $aOptions[2] = $bTestSelectOnce
If $bSelect1 = 1 Then
$aOptions[0] = "True"
Else
$aOptions[0] = "False" <<< This is where the error occurs.
EndIf
If $bSelect2 = 1 Then
$aOptions[1] = "True"
Else
$aOptions[1] = "False"
EndIf
If $bSelect3 = 1 Then
$aOptions[2] = "True"
Else
$aOptions[2] = "False"
EndIf
Return $aOptions
EndFunc
Is putting data into an array while in a If - Then - Else illegal?