Hey Tony, Simpson... ne1 else who knows VB
Some dumbass at my skool made a .txt file on our student common drive called chatprogram.txt.. well me and a couple friends went in there and reamed him out, about it being a text file and not a program (during 1st period programming, in Turing) Neways... he's like o BS let's see UR proggy then. So, I figure WTH? I'll make one.
I ran into the queerest problem with the time...
{EXAMPLE}
I {Steve0} join the "server"
code: |
ChatTime = #4:35:17 PM#
ChatTime = Time
Open "s:\chat.dat" For Append As #1
Print #1, ChatTime & " - " & "{" & Form2.LoginName & " IS JOINING SERVER}"
Close #1 |
Which works fine... when u open the datafile it says
Quote:
4:46:35 PM - {Steve0 IS JOINING SERVER}
like it should.. BUT when I read it back in
code: |
MaxChat = 0
Open "s:\chat.dat" For Input As #4
For i = 1 To 750
If EOF(4) = True Then
Exit For
End If
Input #4, ChatInput
ChatData(i) = ChatInput
MaxChat = MaxChat + 1
Next i
If OldChat = ChatData(MaxChat) Then
Else
OldChat = ChatData(MaxChat)
txtChat.Text = ""
For i = 1 To MaxChat
txtChat.Text = txtChat.Text & vbCrLf & ChatData(i)
Next i
End If
|
my "chat" box says
Quote:
4
PM - {Steve0 IS JOINING SERVER}
any ideas why it doesn't say exactly whats in the file, and how to make it?
it's just the time thats messed up