bald1 Posted October 18, 2009 Posted October 18, 2009 \Fix18-10-09.au3(74,56) : WARNING: $coordbox2: possibly used before declaration. $closeCoord1 = PixelSearch($coordbox1, $coordbox2, Fix18-10-09.au3(74,56) : ERROR: $coordbox2: undeclared global variable. $closeCoord1 = PixelSearch($coordbox1, $coordbox2, I get this error all of a sudden, and i dont even remember changing anything in the script. The variables, all of them, are declared in beginning of the script. Tried making them both local and global with no change. I havent used this bit in a while, and the error didnt show itself before last night for some strange reason. What could i have changed in this script to generate this, through my noob-perspektive, unjustified error?
bald1 Posted October 18, 2009 Author Posted October 18, 2009 Sorry about this repost, i don't seem to be able to delete my own posts..
water Posted October 18, 2009 Posted October 18, 2009 Could you please post your code so we can have a look at it? Makes debugging a lot easier My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
bald1 Posted October 18, 2009 Author Posted October 18, 2009 (edited) Could you please post your code so we can have a look at it? Makes debugging a lot easier while $continue = True $Coords1 = PixelSearch($vFullSearchCoords1, $vFullSearchCoords2, $vFullSearchCoords3, $vFullSearchCoords4, $aFullSearch[$i], 5, 1); search for den store pixel If Not @error Then $coordbox1 = $coords1[0] - 50; Create coord box $cooodbox2 = $coords1[1] - 50 $coordbox3 = $coords1[0] + 75 $coordbox4 = $coords1[1] + 100 For $z = 0 to 1 step + 1 $closeCoord1 = PixelSearch($coordbox1, $coordbox2, $coordbox3, $coordbox4, $aCloseUpSearch[$i][$z], 8, 1); box search pixels If not @error Then $var = $var + 1 Else $var = 0 EndIf Next If $var = 2 Then and tons more that should irrelevant All the variables are declared in the local scope earlier.. Edited October 18, 2009 by bald1
furrycow Posted October 18, 2009 Posted October 18, 2009 (edited) while $continue = True $Coords1 = PixelSearch($vFullSearchCoords1, $vFullSearchCoords2, $vFullSearchCoords3, $vFullSearchCoords4, $aFullSearch[$i], 5, 1); search for den store pixel If Not @error Then sleep(100) Sleep(1000) $coordbox1 = $coords1[0] - 50; Create coord box $cooodbox2 = $coords1[1] - 50 $coordbox3 = $coords1[0] + 75 $coordbox4 = $coords1[1] + 100 Sleep(100) For $z = 0 to 1 step + 1 $closeCoord1 = PixelSearch($coordbox1, $coordbox2, $coordbox3, $coordbox4, $aCloseUpSearch[$i][$z], 8, 1); box search pixels If not @error Then $var = $var + 1 Else $var = 0 EndIf Next If $var = 2 Then and tons more that should irrelevant All the variables are declared in the local scope earlier.. lol, could be because you spelt it "$cooodbox2 = $coords1[1] - 50" Edited October 18, 2009 by furrycow Instant Lockerz Invite - www.instantlockerzinvite.co.uk
bald1 Posted October 18, 2009 Author Posted October 18, 2009 lol, could be because you spelt it "$cooodbox2 = $coords1[1] - 50" wtfh o0 I used this plenty of times without it erroring out and it working perfectly and now this all of a sudden hahah. Thanks, and sorry for the bother
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now