• Welcome to Valhalla Legends Archive.
 

Help

Started by ColT, September 24, 2004, 10:30 PM

Previous topic - Next topic

ColT

Can someone help me make a database/access, and how to make commands. Thanks. Btw: This is in Visual Basic.

Spht

Quote from: ColT on September 24, 2004, 10:30 PM
Can someone help me make a database/access, and how to make commands. Thanks. Btw: This is in Visual Basic.

You might want to search Google first, to get started.  What you're asking sounds pretty general and non-botdev-specific.  If you have a specific question later on, then feel free to ask.

ColT

Ok. Thanks by the way Spht.

MyndFyre

Quote from: titan0060 on September 26, 2004, 06:36 AM
a pretty good way to learn about access lists and stuff is to look at other people sources.

Goto this site and look under downloads.  I'm download admin there and there are like 70 sources u can look at.
http://bnetweb.com

No, a good way to learn about access lists is to think about how you want to structure yours, then apply your knowledge into creating one from scratch.  Looking at other's sources is an efficient way of encouraging oneself to copy them and then not understanding them later.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Michael

ya, i would suggest something simple,  make a file put name access then make a code that opens the file and checks for user access.
example

public access as string
public sub loaddb(user as string)
dim info as string
dim split() as string
open app.path & "/database.txt" for input as #1
input #1, info
split(lcase(info), " ", 1)
if split(0) = lcase(name) then
access = lcase(split(1))
end if
close #1
end sub


Minux

Quote from: -MichaeL- on September 28, 2004, 06:34 PM
ya, i would suggest something simple,  make a file put name access then make a code that opens the file and checks for user access.
example

public access as string
public sub loaddb(user as string)
dim info as string
dim split() as string
open app.path & "/database.txt" for input as #1
input #1, info
split(lcase(info), " ", 1)
if split(0) = lcase(name) then
access = lcase(split(1))
end if
close #1
end sub



Nah, use a function with a loop inside. For example


Public Function CheckAccess(Username As String, byRef Access As Integer)

Close #1

Dim Temp As String

Access = 0

Open App.Path & "/database.txt" For Input As #1

Do While Not EOF(1)

Input #1, Temp

If LCase(Split(Temp, " ")(0)) = LCase(Username) Then
Access = Split(Temp, " ")(1)
Exit Function
End If

Loop

Close #1

End Function


And when you call the function just do something along these lines.


CheckAccess(strUsername As String, strAccess As String)

And strAccess will obtain the value of the user's access if found, otherwise it will be 0.

Michael

Whoops forgot the loop he sorry about that. hope i helped tho.