Search the Community
Showing results for tags 'non accessible'.
Found 1 result
i have seen many pointing out issues related to this, i tried reading through them - still unable to solve mine.. i have a script which reads certain lines based on a search item, this is an iterative process - the ldflst_file gets updated for each iteration and the script finds the line number which has the search item. this works perfectly for few iterations, but stops in some cases abruptly with the error = Subscript used on non-accessible variable $aRead^ ERROR I have verified that the search item is present in the file. what could be the reason for this code to stop in certain cases. thanks for help my code below (partial).. full code is in attachment local $aRead=FileReadToArray($ldflst_file) global $ldflst_var1=" JOINT LOAD FORCE(X) FORCE(Y) FORCE(Z) MOMENT(X) MOMENT(Y) MOMENT(Z)" for $i= 0 to $ldflst_totlines ; ldflst_totlines is total number of lines in the file 'ldflst_file' if $aRead[$i]=$ldflst_var1 Then $ldflst_LFound=$i ExitLoop else EndIf Next nomo_new1.au3