Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3.0.7 help
#3
Ok, everything works fine. I log into my account, click create new character, enter a character name and choose my class, then when I click on create it gives me:

Compile Error:

Invalid or unqualified reference

And it highlights the .FKey in the If .FKey = 0 Then

Code:
Sub AddChar(ByVal Index As Long, ByVal Name As String, ByVal Sex As Byte, ByVal ClassNum As Byte, ByVal CharNum As Long)
Dim RS As ADODB.Recordset
Set RS = New ADODB.Recordset
Dim I As Long

        RS.Open "SELECT * FROM characters;", Conn_Client, adOpenStatic, adLockOptimistic
        RS.AddNew

        RS!Account = Player(Index).FKey
        RS!Name = Trim$(Name)
        RS!Sex = Sex
        RS!Class = ClassNum
        RS!Sprite = Class(ClassNum).Sprite
        RS!Level = 1
        RS!str = Class(ClassNum).str
        RS!DEF = Class(ClassNum).DEF
        RS!SPEED = Class(ClassNum).SPEED
        RS!MAGI = Class(ClassNum).MAGI
        RS!Map = 1
        RS!X = 1
        RS!Y = 1
        RS!HP = 10
        RS!MP = 10
        RS!SP = 10
        RS.Update
    
    If .FKey = 0 Then
        .FKey = RS!FKey
    End If

    RS.Close
    Set RS = Nothing
End Sub
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)