• Welcome to Valhalla Legends Archive.
 

Re: VB - ranks

Started by warz, September 08, 2002, 01:55 PM

Previous topic - Next topic

warz

If InStr(GetAccess(user),"A") Then
  Select Case Command
    Case "quit"
      unload frmmain
  End Select
End If

----

Public Function GetAccess(user as string) as string
 for x = 1 to lstDatabase.listitems.count
   if lstdatabase.listitems(x).text = user Then
     GetAccess = lstdatabase.finditem(user).tag
   Else
   End If
 Next
End Function

that's an idea for flag based bots. just load database into a listview. for number based bots i guess you could do..

If GetAccess(user) >= 90 Then
  Select Case Command
    Case "quit"
      unload frmmain
  End Select
End If

Get creative :P

Mesiah / haiseM

1. warz said:

If GetAccess(user) >= 90 Then
  Select Case Command
    Case "quit"
 unload frmmain
  End Select
End If
 
2. Now if ur gonna make a quit command, u cant just unload frmmain, you would use the End statement to terminate the bot, otherwise the project will still be open and eatin resources :-P

Well if your going to load them into a listview and split em up, then you can make it extremely detailes, such as what rank, what access, when he was added, and who he was added by, and stick them in subitem arrays.

get super creative :-P
]HighBrow Innovations
Coming soon...

AIM Online Status: 

Justin

#2
k thx im trying it out right now  ;) ill be as creative as i can be   :D

warz

#3
Was general idea plz

dxoigmn

#4
Actually 'end' is much worse then 'unload'.  The smart thing to do is unload all active forms.

CaPSuLeS

Ending thr program kills it from active process, resulting it it NOT eating resources. Unload simply takes those forms away, which takes longer to do, and leaves for more errors. :P

Grok

Quote from: CaPSuLeS on November 18, 2003, 12:02 PM
Ending thr program kills it from active process, resulting it it NOT eating resources. Unload simply takes those forms away, which takes longer to do, and leaves for more errors. :P

Hi, welcome to our forums.

Two things.  1)  It is generally frowned upon to revive dead topics unless you have a significantly different viewpoint on maybe an unsolved issue.   2)  Your viewpoint in this reply is technically wrong.  Unload causes a form to follow a sequenced shutdown path, while End leaves allocated objects in memory.  End almost never appears in a program except when written by a first-year VB programmer.

warz

Quote« on: September 08, 2002, 01:55 pm »

Damn, quite some time ago.

Banana fanna fo fanna


Grok

Seems as though it's a hit-and-run too.

warz

Man, my skills were intense back then. Look at me go!

Adron

And I still like to use End, and see it in lots of programs. And I still tend to look at it as a great way to shut down a program nice and quick. Sure, if there's cleanup you'd want to do first, you better do it, but if you just want to end the program, End does it.