Help with syntax, please! Workaround for Struct issue.

DrWizard:
Apparently this problem is due to the autogeneration of prototypes.

Yeah, unfortunately the people who implemented the IDE weren't quite as clever as they thought - the automatic prototyping is a questionable idea implemented poorly and routinely messes up code like this. The simplest workaround for this bug in the IDE is to put your type definitions in a separate .h file and #include them in the .ino file. An alternative workaround is to put your code in ordinary .c/.cpp files instead of .ino files - only the .ino files benefit from this daft mucking about that the IDE does. There are some other workarounds that consist of putting the prototypes in for yourself (for some IDE versions, this will inhibit the IDE from adding its own ones) or adding a dummy variable declaration at the point where you want the autogenerated prototypes to appear.