12-11-2007, 05:30 AM
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
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