What do you guys think is the best way to sort the different ranks out?
(http://www.gosugaming.net/ClanList.JPG)
You know
(Chieftain top)
(shamin)
(Grunt)
(Peon)
Quote from: GoSuGaMING on June 28, 2004, 12:44 AM
What do you guys think is the best way to sort the different ranks out?
(http://www.gosugaming.net/ClanList.JPG)
You know
(Chieftain top)
(shamin)
(Grunt)
(Peon)
I do it this way:
Chieftan: Insert at 0.
Shaman: Insert at 0 plus the number of Chieftans received.
Grunt: Insert at 1 plus the number of Shamans received.
Peons: Insert at 1 plus the number of Shamans and Grunts received.
Recruits: Insert at 1 plus the number of Shamans, Grunts, and Peons received.
I added them all to a array
Than for each item in the array
i had
Name as String
Rank as Integer
Status as Integer
Than i just used a Loop to add them to the listview depending on Rank ;\
I use the ListView's built-in sorting system - one of my columns [invisible] contains their rank, so I just sort Ascending based on that column.
Stealth.. I might look into doing it that way! Is that ok if i use your idea?
Quote from: Stealth on June 28, 2004, 04:36 PM
I use the ListView's built-in sorting system - one of my columns [invisible] contains their rank, so I just sort Ascending based on that column.
Public Function GetClanList(Data As String)
Form1.LvClan.ListItems.Clear
Dim List() As String
Dim x As Integer
List = Split(Mid$(Data, 10), Chr(0), -1)
For x = 0 To UBound(List)
If Not List(x) = "" Then
Select Case Asc(List(x))
Case Is > 4
Form1.LvClan.ListItems.Add , , List(x)
Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).SmallIcon = 128
Case 0, 1, 2, 3, 4
Select Case Asc(List(x))
Case 4
Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).SmallIcon = 131
Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).Add , , "1"
'Clan Chieftain
Case 3
Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).SmallIcon = 132
Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).Add , , "2"
'Clan Leader
Case 2
Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).SmallIcon = 130
Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).Add , , "3"
'Clan Member
Case 1
Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).SmallIcon = 129
Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).Add , , "4"
'Member thats been in clan for over a week
Case 0
Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).SmallIcon = 128
Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).Add , , "4"
'Member thats been in clan under a week
Case Else
Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).SmallIcon = 128
Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).Add , , "4"
End Select
Case Else
End Select
End If
Next x
Form1.LvClan.Refresh
End Function
It doesnt add the 4 for Peons... I know that it sorts it by Numerical Numbers... Do you see a flaw in the code?
Sub AddMember(ByVal Name As String, Rank As Integer, Online As Integer)
If Rank = 0 Then Rank = 1
If Rank > 4 Then Rank = 5 '// handle bad ranks
'// add user
With lvClan
.ListItems.Add lvClan.ListItems.Count + 1, , Name, , Rank
.ListItems(.ListItems.Count).ListSubItems.Add , , , Online + 6
.ListItems(.ListItems.Count).ListSubItems.Add , , Rank
.SortKey = 2
.SortOrder = lvwDescending
.Sorted = True
End With
End Sub
Quote from: Stealth on June 28, 2004, 06:56 PM
Sub AddMember(ByVal Name As String, Rank As Integer, Online As Integer)
If Rank = 0 Then Rank = 1
If Rank > 4 Then Rank = 5 '// handle bad ranks
'// add user
With lvClan
.ListItems.Add lvClan.ListItems.Count + 1, , Name, , Rank
.ListItems(.ListItems.Count).ListSubItems.Add , , , Online + 6
.ListItems(.ListItems.Count).ListSubItems.Add , , Rank
.SortKey = 2
.SortOrder = lvwDescending
.Sorted = True
End With
End Sub
If i use your code i will never learn.. help me with mine if you would :X
Quote from: MoNeY on June 29, 2004, 12:30 AM
the code you posted wasnt yours >.< it was from Void Bot Source
I'm not surprised
Anyways, Maybe if you Instant Messaged Or Private Messaged stealth and asked him to explain how to use the Listview's Sort Property, he would explain it to you.
Otherwise you could post in the Visual Basic section of this forum; under the topic "Sorting listview items".
Or here's a revolutionary idea: rtfm...
rtfm?
Quote from: BaDDBLooD on June 29, 2004, 07:53 AM
Quote from: MoNeY on June 29, 2004, 12:30 AM
the code you posted wasnt yours >.< it was from Void Bot Source
Anyways, Maybe if you Instant Messaged Or Private Messaged stealth and asked him to explain how to use the Listview's Sort Property, he would explain it to you.
The ListView's sort feature is self-explanitory, as are most VB things.
Edit:
Whew, this is my first post in this forum in a little while - feels wierd. :P
Quote from: BaDDBLooD on June 29, 2004, 07:53 AM
Quote from: MoNeY on June 29, 2004, 12:30 AM
the code you posted wasnt yours >.< it was from Void Bot Source
I'm not surprised
Anyways, Maybe if you Instant Messaged Or Private Messaged stealth and asked him to explain how to use the Listview's Sort Property, he would explain it to you.
Otherwise you could post in the Visual Basic section of this forum; under the topic "Sorting listview items".
I know the method for it... stop posting stupid shit... better yet dont try to help me... you never can or do so ignore my threads ... k thnx
Quote from: Tuberload on June 29, 2004, 05:01 PM
Quote from: BaDDBLooD on June 29, 2004, 04:47 PM
rtfm?
read the f*cking manual
MSDN is better
The problem right now is that its not recgonizing my &H0 case
Quote from: BaDDBLooD on June 28, 2004, 03:42 PM
I added them all to a array
Than for each item in the array
i had
Name as String
Rank as Integer
Status as Integer
Than i just used a Loop to add them to the listview depending on Rank ;\
keep in mind, you didn't write your code, you took it from a source.
Edit: Sorry, I know Badd made his own 0x7D code, I was just feeling the effects of a boot to the colon.
Quote from: ChR0NiC on June 29, 2004, 05:42 PM
Quote from: BaDDBLooD on June 28, 2004, 03:42 PM
I added them all to a array
Than for each item in the array
i had
Name as String
Rank as Integer
Status as Integer
Than i just used a Loop to add them to the listview depending on Rank ;\
keep in mind, you didn't write your code, you took it from a source.
thats not helping me :X
0x00: Initiate that has been in the clan for less than one week
0x01: Initiate that has been in the clan for over one week
0x02: Member
0x03: Officer
0x04: Leader
im not even recieving 0x00
Quote from: ChR0NiC on June 29, 2004, 05:42 PM
Quote from: BaDDBLooD on June 28, 2004, 03:42 PM
I added them all to a array
Than for each item in the array
i had
Name as String
Rank as Integer
Status as Integer
Than i just used a Loop to add them to the listview depending on Rank ;\
keep in mind, you didn't write your code, you took it from a source.
CRoNo
[email protected]: Oh yeah I gave this code to baddblood since his code sucked
GoSuGaMING: what code
CRoNo
[email protected]: 0x7d
BaddBlood you have no room to post on this thread...
Yeah it sucked.
I did it myself, so of course it sucked.
I am a Complete Novice at Visual Basic, and i never ever say i am better than what i actually am.
Binary was nice enough to give me the "Parsing" of 0x7D cause the way i did it was Really Really bad. Than i took what he gave me and Added my own for the listview, which i used a array. Which is EXACTLY what i stated in that one post.
You have no right to say where i can or can't post.
Quote from: GoSuGaMING on June 29, 2004, 05:46 PM
Quote from: ChR0NiC on June 29, 2004, 05:42 PM
Quote from: BaDDBLooD on June 28, 2004, 03:42 PM
I added them all to a array
Than for each item in the array
i had
Name as String
Rank as Integer
Status as Integer
Than i just used a Loop to add them to the listview depending on Rank ;\
keep in mind, you didn't write your code, you took it from a source.
thats not helping me :X
0x00: Initiate that has been in the clan for less than one week
0x01: Initiate that has been in the clan for over one week
0x02: Member
0x03: Officer
0x04: Leader
im not even recieving 0x00
I Don't know why your not recieving 0x00, maybe Noone is a Initiate?
EDIT: Please don't flame me, all i was trying to do was help to the best of my ability.
You told me to "test" it... theres nothing to test.... so hows that helping me? and nice double post :X
Well i thought testing the problem with different solutions would have been the best idea at the time.. sorry if you didn't feel that would work. Sorry to the admins for the double post.. but i thought that 2 different ones would be more clear.
Quote from: BaDDBLooD on June 29, 2004, 07:48 PM
Well i thought testing the problem with different solutions would have been the best idea at the time.. sorry if you didn't feel that would work. Sorry to the admins for the double post.. but i thought that 2 different ones would be more clear.
you havnt helped me at all through this whole thread of course im a member under a weekold... i added myself to the clan list 2 days ago...
Jesus Christ, would you two stop fighting in EVERY goddamn BotDev thread?
Maybe instead of being a fucking ass saying i didn't help you, you could say thanks for trying. You should definately say thanks to everyone in this thread who has actually helped you.
next time i won't even post, you can help your self.
http://www.rancidkoolaid.com/images/arguing.jpg
You two should really just ignore each other for a while.
Quote from: muert0 on June 29, 2004, 10:51 PM
http://www.rancidkoolaid.com/images/arguing.jpg
That always cracks me up
I do ignore him falcon, i was just trying to help someone, i guess i shouldn't ;\
Quote from: BaDDBLooD on June 29, 2004, 10:58 PM
Quote from: muert0 on June 29, 2004, 10:51 PM
http://www.rancidkoolaid.com/images/arguing.jpg
That always cracks me up
I do ignore him falcon, i was just trying to help someone, i guess i shouldn't ;\
You provoke every fight....
provoke
www.webster.com
Be quiet already.
I'm getting sick of this. I've already had to delete numerous stupid posts in this thread. So, warning:
Stop posting useless crap. There are several forums where that is appropriate. This one is not among them. Please make only useful, relevant, substantive posts. Flaming is not allowed. Personal attacks are not allowed. Mildly offensive images debasing disabled people are not allowed.
I'm going to start requesting bans if people do not adhere to the policy of this forum, which has been very clearly laid out by Spht (http://forum.valhallalegends.com/phpbbs/index.php?board=17;action=display;threadid=707).