Hi...
When im adding some code, all of the other code stops working
Here's the code:The code works fine without the bolded part...VB Code:
If Left$(strData, 9) = "USERLOGIN" Then strArray2 = Split(strData, vbCrLf) If ReadINI(App.Path & "\users.ini", Right$(strArray2(1), Len(strArray2(1)) - 13), "Password", vbNullString, 100) = Right$(strArray2(2), Len(strArray2(2)) - 13) Then '<:-) :WARNING: Empty String assignment updated to use vbNullString '<:-) :PREVIOUS CODE : If ReadINI(App.Path & "\users.ini", Right$(strArray2(1), Len(strArray2(1)) - 13), "Password", "", 100) = Right$(strArray2(2), Len(strArray2(2)) - 13) Then If ReadINI(App.Path & "\users.ini", Right$(strArray2(1), Len(strArray2(1)) - 13), "Banned", vbNullString, 100) = "True" Then '<:-) :WARNING: Empty String assignment updated to use vbNullString '<:-) :PREVIOUS CODE : If ReadINI(App.Path & "\users.ini", Right$(strArray2(1), Len(strArray2(1)) - 13), "Banned", "", 100) = "True" Then sckIntro(Index).SendData "BANNED" Exit Sub End If If lstUsers.ListCount < 20 Then sckIntro(Index).SendData "FULL" Exit Sub End If [b] Dim i As Integer For i = 0 To lstUsers.ListCount - 1 lstUsers.ListIndex = i If lstUsers.Text = Right$(strArray2(1), Len(strArray2(1)) - 13) Then sckIntro(Index).SendData "ALREADYLOGGEDIN" Exit Sub Next i End If[/b] sckIntro(Index).SendData "GOODLOGIN" lstActions.AddItem "[" & Format$(Time, "hh:mm:ss") & "] " & Right$(strArray2(1), Len(strArray2(1)) - 13) & " has connected." AddHScroll lstActions Else 'NOT READINI(APP.PATH... sckIntro(Index).SendData "BADLOGIN" lstActions.AddItem "[" & Format$(Time, "hh:mm:ss") & "] Someone tried to login with a bad username or password!" AddHScroll lstActions End If End If
When i add it, the code stops working and its giving errors!
What should i do?![]()
Thanks!![]()





Reply With Quote