Clan x86

Technical (Development, Security, etc.) => General Programming => Topic started by: drka on May 30, 2005, 01:34:34 am

Title: VBS:Tryout list
Post by: drka on May 30, 2005, 01:34:34 am
Code: [Select]
Sub Event_UserTalk(Username, Flags, Message, Ping)
If LCase(Message) = BotVars.Trigger & "tryouts" Then
GetDBEntry Username, myAccess, myFlags
If myAccess => 80 Then
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(BotPath & "users.txt", 1, False)
lines = Split(ts.ReadAll, vbCrLf)
For i = 0 to UBound(lines)
If Right(lines(i), 1) = "T" Then
AddQ "Tryout: " & Split(lines(i), " ") (0)
tFound = True
End If
Next
If Not tFound Then
AddQ "OMFG WTF. NOBODY WAS FOUND OMFG GAY."
End If
End If
End If
End Sub


someone tell me WHY THE FUCK IT ISNT READING THE FUCKING FILE.
Title: Re: VBS:Tryout list
Post by: Lobo on June 01, 2005, 11:01:05 pm
The fso looks fine, try doing a debug.print fso.readall to see if it is reading the file, or maybe set some break points.
Title: Re: VBS:Tryout list
Post by: Blaze on June 01, 2005, 11:32:34 pm
VBS... not VB Lobo.
Title: Re: VBS:Tryout list
Post by: Nate on June 02, 2005, 09:14:53 pm
  If Right(lines(i), 1) = "T" Then

  If UCase(Mid(lines(i), 1, 1) = "T" Then
Title: Re: VBS:Tryout list
Post by: drka on June 03, 2005, 08:36:16 pm
Mid? go die. this file is the userlist.txt file of stealthbot. so your code wont work unless the user was a specified length therefore making you stupid.
Title: Re: VBS:Tryout list
Post by: deadly7 on June 03, 2005, 08:41:33 pm
Ashame there is no "userlist.txt"? It's "users.txt", last I checked (1 minute before posting this)
Title: Re: VBS:Tryout list
Post by: drka on June 03, 2005, 09:11:51 pm
i was guessing. shutup.
Title: Re: VBS:Tryout list
Post by: Newby on June 03, 2005, 09:43:12 pm
Now I see why nobody wanted to help you.
Title: Re: VBS:Tryout list
Post by: drka on June 03, 2005, 11:24:10 pm
yep. i have a reputation for flaming and being an asshole to people. of course there is a nicer side of me. however nobody wants to see it :(.
Title: Re: VBS:Tryout list
Post by: Newby on June 03, 2005, 11:50:02 pm
I doubt people want to see the mean side of you over the nice side of you...
Title: Re: VBS:Tryout list
Post by: Nate on June 04, 2005, 10:03:10 am
Mid? go die. this file is the userlist.txt file of stealthbot. so your code wont work unless the user was a specified length therefore making you stupid.

Mid(String, 1, 1) is the same as Right(String, 1)
Title: Re: VBS:Tryout list
Post by: Sidoh on June 04, 2005, 01:00:42 pm
Mid? go die. this file is the userlist.txt file of stealthbot. so your code wont work unless the user was a specified length therefore making you stupid.

Christ. Calm down.
Title: Re: VBS:Tryout list
Post by: drka on June 04, 2005, 04:43:59 pm
Mid? go die. this file is the userlist.txt file of stealthbot. so your code wont work unless the user was a specified length therefore making you stupid.

Mid(String, 1, 1) is the same as Right(String, 1)

... no its not. that counts the first line from left to right.

< = left
> = right
Title: Re: VBS:Tryout list
Post by: Blaze on June 04, 2005, 05:44:27 pm
If the string is 1 letter long is equivalent, but not the same.
Title: Re: VBS:Tryout list
Post by: drka on June 04, 2005, 06:10:37 pm
my method is still better :P.
Title: Re: VBS:Tryout list
Post by: Nate on June 04, 2005, 07:01:52 pm
Fine Mid(String, Len(String) - 1, 1)