Jump to content

Recommended Posts

Posted (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 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
Posted

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted (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 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

Posted

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

Posted (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 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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...