-
Another problem...
[Originally posted by Edward Ropple]
Well, I have a public 3-dimension array that's of a custom type. However, when anything tries to access it, VB says "Invalid Qualifier." What am I doing wrong, and how can I fix it?
Also, I can't view the VB help files because I don't have the MSDN discs, so please don't tell me to refer to them.
-
Re:Another problem...
[Originally posted by FreeVBCode.com]
Can you post the˙ Type declaration and the code where you get the error?
-
Re:Re:Another problem...
[Originally posted by Edward Ropple]
I get it on all the lines referring to my array, but here they are. I bracketed the part that VB starts whining about and highlights too.
Here it is:
Type Playertype
˙ ˙ avg As Single
˙ ˙ single As Integer
˙ ˙ double As Integer
˙ ˙ triple As Integer
˙ ˙ name As String
˙ ˙ speed As Integer
˙ ˙ power As Integer
˙ ˙ defense As Integer
˙ ˙ bat As Integer
˙ ˙ eye As Integer
˙ ˙ arm As Integer
˙ ˙ accuracy As Integer
˙ ˙ pitchspeed As Integer
˙ ˙ stamina As Integer
˙ ˙ hits As Integer
˙ ˙ atbats As Integer
˙ ˙ steal As Integer
˙ ˙ stealattempts As Integer
˙ ˙ homerun As Integer
˙ ˙ plays As Integer
˙ ˙ errors As Integer
˙ ˙ misses As Integer
˙ ˙ hand As Byte
˙ ˙ pos As Byte
End Type
Public LeaguePlayers(2, 14, 25) As Playertype
Private Sub Option15_Click()
playeredited = 1˙ 'this line goes okay
Frame2.Enabled = False˙ 'this line goes ok
txtPlayerName.Text = [LeaguePlayers].name(1, teamedited, playeredited)˙ 'error
hsbSpeed.Value = LeaguePlayers.speed(1, teamedited, playeredited)
hsbDefense.Value = LeaguePlayers.defense(1, teamedited, playeredited)
hsbPower.Value = LeaguePlayers.power(1, teamedited, playeredited)
hsbBat.Value = LeaguePlayers.bat(1, teamedited, playeredited)
hsbEye.Value = LeaguePlayers.eye(1, teamedited, playeredited)
hsbArm.Value = LeaguePlayers.arm(1, teamedited, playeredited)
vsbAccuracy.Value = LeaguePlayers.accuracy(1, teamedited, playeredited)
vsbPitchSpeed.Value = LeaguePlayers.pitchspeed(1, teamedited, playeredited)
vsbStamina.Value = LeaguePlayers.pitchspeed(1, teamedited, playeredited)
If LeaguePlayers.hand(1, teamedited, playeredited) = 0 Then righthanded.Value = True
If LeaguePlayers.hand(1, teamedited, playeredited) = 1 Then lefthanded.Value = True
Select Case LeaguePlayers.pos
˙ ˙ Case 2
˙ ˙ optC.Value = True
˙ ˙ Case 3
˙ ˙ opt1B.Value = True
˙ ˙ Case 4
˙ ˙ opt2B.Value = True
˙ ˙ Case 5
˙ ˙ opt3B.Value = True
˙ ˙ Case 6
˙ ˙ optSS.Value = True
˙ ˙ Case 7
˙ ˙ optLF.Value = True
˙ ˙ Case 8
˙ ˙ optCF.Value = True
˙ ˙ Case 9
˙ ˙ optRF.Value = True
˙ ˙ Case 10
˙ ˙ optDH.Value = True
˙ ˙ Case 11
˙ ˙ optSP.Value = True
˙ ˙ Case 12
˙ ˙ optRP.Value = True
˙ ˙ Case 13
˙ ˙ optCP.Value = True
End Select
End Sub
Hope that helps - and yes, I know I should have renamed that Option15, but I'm lazy and this isn't going anywhere except to me. Thanks for the help!
Ed
-
Re:Re:Re:Another problem...
[Originally posted by FreeVBCode.com]
All of this is off the top of my head, I haven't time to test or look up in the documentation.˙ So try different combinations of the below suggestions, and you will probably solve your problem.
I don't think you should be bracketing LeaguePlayers.˙ Also, I think the syntax for referencing arrays of UDTS is LeaguePlayers(1, teamedited, playeredited).bat.˙ Finally, I don't think you can use reserved words such as single and double as variable names in UDTs.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks