18-11-2007, 05:10 AM
Well im attempting to add Races to my game, I figured the easeist way to do it would be to base it of the class system. So I did. Now im getting this error, RTE 13 Type Mismatch;
The bold red is what the error is being directed at. Now, Ive looked over everything I could think of that would be wrong, any ideas? If you need more info on the code feel free to ask. :)
Quote:Sub LoadRaces()
Dim FileName As String
Dim i As Long
Call CheckRaces
FileName = App.Path & "\races.ini"
Max_Races = Val(GetVar(FileName, "INIT", "MaxRaces"))
ReDim Race(0 To Max_Races) As RaceRec
Call ClearRaces
For i = 0 To Max_Races
Race(i).Name = GetVar(FileName, "RACE" & i, "Name")
Race(i).Sprite = GetVar(FileName, "RACE" & i, "Sprite")
DoEvents
Next i
End Sub
The bold red is what the error is being directed at. Now, Ive looked over everything I could think of that would be wrong, any ideas? If you need more info on the code feel free to ask. :)