Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Banning System
#1
Ok on the banning system on the backup tuts, im having a problem server side. Rte 9, subscript out of range. when I try to login.

highlights:
Code:
If Ban(i).BannedIP  "" Then

Heres the whole sub:
Code:
Function IsBanned(ByVal IP As String) As Boolean
Dim FileName As String, fIP As String, fName As String
Dim f As Long
Dim b As Integer
Dim BIp As String
Dim i As Integer
IsBanned = False
FileName = App.Path & "\banlist.ini"
For i = 0 To MAX_BANS
If Ban(i).BannedIP  "" Then
BIp = Ban(i).BannedIP
If IP = BIp Then
IsBanned = True
Exit Function
Else: IsBanned = False
End If
End If
Next i
End Function

any idea?
Reply
#2
Perhaps:
Code:
For i = 0 To MAX_BANS
Should be:
Code:
For i = 1 To MAX_BANS
Reply
#3
yay cool, ty. Dang theres something wrong with my source, it gets stuck on sending info ;(
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)