please help (1 Viewer)

Feral

New Member
Joined
Mar 24, 2004
Messages
7
Gender
Male
HSC
2004
Does anybody here know how to link to arrays together in visual basic.
What i'm trying to do is have a persons name and their skill level as an integer linked somehow so when i bubble sort the integers the names will sort according to where their corresponding skill is. If anyone could help i would be grateful, thanks.
 

J0n

N/A
Joined
Aug 28, 2003
Messages
410
Gender
Male
HSC
2004
Why don't you make each person a record? You can make your own user-defined type something like:
Code:
Type Person
     Name as String
     SkillLevel as Integer
End Type
 

Feral

New Member
Joined
Mar 24, 2004
Messages
7
Gender
Male
HSC
2004
Thanks for replying, i've never really used records before but i'll give it a go, thanks again.
 
Joined
May 27, 2004
Messages
107
Gender
Male
HSC
2004
stand alone or web
and is it .net or 6??

u could use database rather than records as well
 

Feral

New Member
Joined
Mar 24, 2004
Messages
7
Gender
Male
HSC
2004
Should i create an array of records and how do i get that array of records to be sorted by a certain data in there so player skill, so confusing, starting to realise how limited my vb knowledge is, if anyone can help, our school doesn't even have a proper sdd teacher, our teacher left leaving us with a 2 maths teachers. One taught the 3 unit computing which involved sdd but has forgotten everything, i feel like applying for one of those misadventure thingos at the board of studies.
 

J0n

N/A
Joined
Aug 28, 2003
Messages
410
Gender
Male
HSC
2004
Well, once you have created you user-defined type (as above), then create an array of Persons (e.g People) of datatype Person.
e.g
Dim People(5) as Persons

Now each item in your array has a Name and SkillLevel property. These can be accessed like:
Msgbox People(3).Name
People(3).SkillLevel = 15
 
Joined
May 27, 2004
Messages
107
Gender
Male
HSC
2004
vb.net or vb6

well my teacher has left for this term and we have an ipt teacher who cant programme but atleast the proper teacher comes in and teaches us theory but no programming help what so ever
 

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Heh you could of also utilised a Hashtable, which i'm not sure if VB 6 has.
 

Scanorama

Member
Joined
Mar 26, 2004
Messages
920
Location
Australia
Gender
Male
HSC
2004
I think he is talking about vb 6.
How many of your class is using Visual Basic.net? Just out of curiosity.
Our class is screwed too, the teacher we have has no idea what Visual Basic is. And she doesn't even know the stuff in the text book.

Gough
 
Last edited:

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Originally posted by Gough Whitlam
I think he is talking about vb 6.
How many of your class is using Visual Basic.net? Just out of curiosity.
Our class is screwed too, the teacher we have has to no idea what Visual Basic is. And she doesn't even know the stuff in the text book.

Gough
LOL that's bad... :p..
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top