Jump to content
raven221084

subscript used on non-accessible variable.

Recommended Posts

raven221084

ok i have run into a common issue by the looks of it but cant seem to find the right resolution for it in my case, the full error message is line 68 (file c.......) for $i = 1 to $Config[0][0], $i = 1 to $Config^Error, subscript used on non-accessible variable.

this is the part of the script that is failing on me-

 

GUICtrlCreateLabel("Gold", 285-265, 285-132-35, 70, 17)
GUICtrlSetColor(-1, 0x808000)
global $gui_status_gold_label = GUICtrlCreateLabel("0", 370-265, 285-132-35, 40, 17, $SS_RIGHT)
GUICtrlSetColor(-1, 0x808000)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("Status: Time", 10, 310 - 90 - 75, 255, 43)
GUICtrlCreateLabel("Total:", 20, 330 - 90 - 75, 50, 17)
Global $label_stat = GUICtrlCreateLabel("min: 000  sec: 00", 70, 330 - 90 - 75)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$txtName = GUICtrlCreateCombo($strName, 60, 330 - 90 - 45, 150, 20)
$Config = IniReadSection("Name.ini", "Name")
For $i = 1 To $Config[0][0]
    GUICtrlSetData($txtName, $Config[$i][1] )
Next
GUICtrlCreateGroup("Status: Current Action", 10, 375 - 90 - 65, 255, 45)
Global $STATUS = GUICtrlCreateLabel("Script not started yet", 20, 390 - 90 - 65, 235, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

 

the issue is in red, i have spent about 8 hours trying to resolve this situation with no luck, i am very new to autoit so if you could keep the replies very dumbed down that would be great as i am learning as i go, thanks in advance for any help you can offer.

Share this post


Link to post
Share on other sites
water

Check the return code of InIReadSection. If there is an error then $Config is not a 2D array.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×