JackDinn Posted November 6, 2009 Posted November 6, 2009 (edited) ok, so iv decided its about time i started looking at the beta's. It fills me with dread having to go through all my old scripts and re-do them, but there ya go.Anyhow, my first problem is that im getting the syntax error $tagWIN32_FIND_DATA previously declared as a 'Const' in the UDF FTP_Ex.au3 now i assume its saying its already been declared in one of the #Includes at the top of FTP_Ex.au3 (although im not sure why it's bothered in beta but not in production) anyhow, so i start searching through the includes to find where it's been declared before but the #includes have #includes and so on!Am i right in my assumption that i need to find where it's already been declared & if so is the only way to find it to go through ALL the #includes & there #includes etc...Thx all.EDIT:-odd ? if i put MsgBox(0, '', $tagWIN32_FIND_DATA) exit Global Const $tagWIN32_FIND_DATA = "DWORD dwFileAttributes; dword ftCreationTime[2]; dword ftLastAccessTime[2]; dword ftLastWriteTime[2]; DWORD nFileSizeHigh; DWORD nFileSizeLow; dword dwReserved0; dword dwReserved1; CHAR cFileName[260]; CHAR cAlternateFileName[14];"I do a syntax check with beta i get WARNING: $tagWIN32_FIND_DATA previously declared as a 'Const'if i do i check with production i get WARNING: $tagWIN32_FIND_DATA: possibly used before declaration.how is the variable Previously declared when checked with beta but not declared when checked with production ? Edited November 6, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D
Moderators Melba23 Posted November 6, 2009 Moderators Posted November 6, 2009 JackDinn,I get the same error in production and Beta 3.3.1.5:>Running:(3.3.0.0):C:\Program Files\AutoIt3\autoit3.exe "M:\Program\Au3 Scripts\fred.au3" M:\Program\Au3 Scripts\fred3.au3 (1) : ==> Variable used without being declared.: >Running:(3.3.1.5):C:\Program Files\AutoIt3\beta\autoit3.exe "M:\Program\Au3 Scripts\fred.au3" M:\Program\Au3 Scripts\fred3.au3 (1) : ==> Variable used without being declared.:Did you have any includes when you got the "already declared" error?As to finding the offending tag, I used my file manager file finder to search for text in the includes (I use PowerDesk) - it took about 2 seconds to tell me that FTPEx.au3 and StructureConstants.au3 are the only includes with that tag inside.I hope this helps.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
JackDinn Posted November 6, 2009 Author Posted November 6, 2009 (edited) Sorry i should have put "if i insert MsgBox(0, '', $tagWIN32_FIND_DATA) exit into the FTP_Ex.au3 script, just above Global Const $tagWIN32_FIND_DATA = "DWORD dwFileAttributes; dword ftCreationTime[2]; dword ftLastAccessTime[2]; dword ftLastWriteTime[2]; DWORD nFileSizeHigh; DWORD nFileSizeLow; dword dwReserved0; dword dwReserved1; CHAR cFileName[260]; CHAR cAlternateFileName[14];"Line well yea i do have the includes that are at the top of FTP_Ex.au3 , i'll give you a copy of the FTP_Ex.au3 that im using just in case its different to yours (shouldn't be though) if I do a syntax check beta it says $tagWIN32_FIND_DATA is previously declared as a 'Const' if i do it with production it does not. also iv searched already in StructureConstants.au3 and i cant find any ref to $tagWIN32_FIND_DATA, in fact i cant find any ref to the tag in any of the #includes or sub #includes etc, i think iv checked them all & nothing. Really if it says its already declared then i should just delete it, but if i start changing & deleting parts of my UDF's that means im defiantly not gonna be able to go back to production and i'll have to get all my scripts up to beta. Edited November 6, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D
Bowmore Posted November 6, 2009 Posted November 6, 2009 The definition of $tagWIN32_FIND_DATA is now in the Beta include file StructureConstants.au3. This is not in the current production version. You should no longer define $tagWIN32_FIND_DATA in your script as it has already been defined, hence the error message telling you the you are trying to redefine a Const. StructureConstants.au3: Line:2393 Global Const $tagWIN32_FIND_DATA = "dword dwFileAttributes; dword ftCreationTime[2]; dword ftLastAccessTime[2]; dword ftLastWriteTime[2]; dword nFileSizeHigh; dword nFileSizeLow; dword dwReserved0; dword dwReserved1; wchar cFileName[260]; wchar cAlternateFileName[14]" "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook
JackDinn Posted November 6, 2009 Author Posted November 6, 2009 (edited) ahh right got it, didn't realize that the beta had its own folder of #includes ! simple once you have been told Pity it don't have its own separate beta user include folder, so i could make the changes to the UDF's i need to and put them separately in it. but i can change the location in the settings back and forth, or i could just put them directly into the beta include folder (i think that folder takes precedence over the user include folder) Cheers Bowmore & Melba23 Appreciated. Edited November 6, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D
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