Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Script error


turbocookie
 Share

Recommended Posts

this is what pops up.

Compile Error:

Variable not defined.

the script..
```
If Casestring = "friendstatus" Then
      Dim Q As Integer
        i = Val(Parse(1))
        Q = Int(Parse(2))
      If i = 0 Then
            frmMirage.lblFriend(Q).ForeColor = &HFF&
      ElseIf i <> 0 Then
            frmMirage.lblFriend(Q).ForeColor = &H8080&
      End If
      Exit Sub
    End If
```
Link to comment
Share on other sites

ok previos error is fixed. now the new one is this.

when i click on the button to open up friends.

i get this error

Compile Error:

Variable not defined.

```
Private Sub cmdFriendList_Click()
    picFriendList.Visible = True
'Finds out if players are online or not
    Call SendData("friendonlineoffline" & SEP_CHAR & lblFriend(Index).Caption & SEP_CHAR & Index & END_CHAR)

End Sub
```
Link to comment
Share on other sites

Try replacing that with this - This also makes it so that when you click on your friends list button again it will hide it.
If that doesn't work it's possible you have incorrectly named one of your labels or such. so double check them

```
Private Sub cmdFriendList_Click()
Dim index As Integer
'this will check if it's visible then it'll make it invisible and vice-versa
    If picFriendList.Visible = False Then
    picFriendList.Visible = True
    Else
    picFriendList.Visible = False
'Finds Players Online Status
    Call SendData("friendonlineoffline" & SEP_CHAR & lblFriend(index).Caption & SEP_CHAR & index & END_CHAR)
End If
End Sub

```
Link to comment
Share on other sites

That means that there's some error with the packets. You may have to change some **If casestring = "…"** statements to **Case "…"**. Also, this isn't a scripting error; it's a sourcing error. By the way, change the code that SillyFace gave you to this:

```
Private Sub cmdFriendList_Click()
Dim Index As Integer
    picFriendList.Visible = True
'Finds out if players are online or not
For Index = 0 to 9
    Call SendData("friendonlineoffline" & SEP_CHAR & lblFriend(Index).Caption & SEP_CHAR & Index & END_CHAR)
Next Index
End Sub
```
Link to comment
Share on other sites

Yeah ok i made a working one for you, With basic of basics, So you'll have to change the labels and friend lists to be where you want them and make it how u want it to look, but everything else is working, I'll upload it for you.
I put it in the normal client, Not big client.. So you'll have to use that or strip the code into big client.. Because i'm not doing that too :P
I'll edit this post once i've uploaded it.

Edit - Here, this is the one with friends list added in ES. Sorry for mediafire.. Hopfully that will be ok.

http://www.mediafire.com/?mmnmnw1dh2z
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...