Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code error
#1
Code:
Private Sub Command1_Click()
frmadminpannel.Show
End Sub

Private Sub Form_Load()
    frmMirage.Width = 10080
    If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then
    Command1.Enabled = True
    End If
End Sub

this is what I changed

the error i got was "RTE 9 subscript out of range" and the following function highlighted

Code:
Function GetPlayerAccess(ByVal Index As Long) As Long
    GetPlayerAccess = Player(Index).Access
End Function

any ideas?
Reply
#2
Player(Index) doesn't exist...(index is less than 1 or higher than the max amount of players)
Reply
#3
GIAKEN Wrote:Player(Index) doesn't exist...(index is less than 1 or higher than the max amount of players)

ok...sooo
Reply
#4
...

Something is wrong with MyIndex or something. Do some debugging...I'm not going to fix your problem for you when you can learn more by fixing it yourself.
Reply
#5
wasn't asking for solution just wondering whats wrong. Thanks
Reply
#6
What's wrong is that for some reason MyIndex is either less than 1, or greater than Max_Players
Reply
#7
lalablah Wrote:wasn't asking for solution just wondering whats wrong. Thanks

Try
Code:
Frmadminpanel.visible = True
instead of
Code:
frmadminpanel.show
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)