| Mirage Source http://www.miragesource.net/forums/ |
|
| Code error http://www.miragesource.net/forums/viewtopic.php?f=201&t=4425 |
Page 1 of 1 |
| Author: | lalablah [ Mon Sep 22, 2008 7:45 pm ] |
| Post subject: | Code error |
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? |
|
| Author: | GIAKEN [ Mon Sep 22, 2008 8:42 pm ] |
| Post subject: | Re: Code error |
Player(Index) doesn't exist...(index is less than 1 or higher than the max amount of players) |
|
| Author: | lalablah [ Mon Sep 22, 2008 9:08 pm ] |
| Post subject: | Re: Code error |
GIAKEN wrote: Player(Index) doesn't exist...(index is less than 1 or higher than the max amount of players) ok...sooo |
|
| Author: | GIAKEN [ Mon Sep 22, 2008 9:32 pm ] |
| Post subject: | Re: Code error |
... 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. |
|
| Author: | lalablah [ Mon Sep 22, 2008 9:42 pm ] |
| Post subject: | Re: Code error |
wasn't asking for solution just wondering whats wrong. Thanks |
|
| Author: | Rian [ Mon Sep 22, 2008 9:45 pm ] |
| Post subject: | Re: Code error |
What's wrong is that for some reason MyIndex is either less than 1, or greater than Max_Players |
|
| Author: | Nean [ Mon Sep 22, 2008 9:46 pm ] |
| Post subject: | Re: Code error |
lalablah wrote: wasn't asking for solution just wondering whats wrong. Thanks Try Code: Frmadminpanel.visible = True instead of Code: frmadminpanel.show
|
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|