21-12-2006, 09:14 PM
Ok im adding the custom experience guide. Its no problem but im using 3.0.7 which uses mysql instead of ini files. Ok that shouldnt be a big deal right? Just find how it loads other tables and so the same but for exp...
well I copied loadnpcs and then switched all for the exp table and doesnt look bad but gets this error...
With object must be user-defined type, Object, or Variant
Then it highlights WITH
Heres the code..
My table is set up simple.
Theres FKey and then Exp and thats it ... should be enough.
well I copied loadnpcs and then switched all for the exp table and doesnt look bad but gets this error...
With object must be user-defined type, Object, or Variant
Then it highlights WITH
Heres the code..
Code:
Sub LoadExps()
Dim i As Long
Dim cCount As Long
Dim RS As ADODB.Recordset
'Setup database stuff
Set RS = New ADODB.Recordset
RS.Open "SELECT * FROM exps;", Conn_Server, adOpenStatic, adLockReadOnly
If RS.EOF Then Exit Sub
RS.MoveFirst
For i = 1 To MAX_EXP
Call SetStatus("Loading Exp " & i & "/" & MAX_EXP)
With Exp(i)
.FKey = CLng(RS("FKey"))
.Exp = CLng(RS("Exp"))
End With
DoEvents
If i MAX_EXP Then
RS.MoveNext
End If
Next i
RS.Close
Set RS = Nothing
End Sub
My table is set up simple.
Theres FKey and then Exp and thats it ... should be enough.