24-01-2008, 04:51 PM
For some reason this function is constantly returning 0...
I have tested the GetPlayerClass(Index) elsewhere and it works fine. Also if I replace the GetPlayerClass(Index) with 1 it returns the proper numbers for thats classes sprites. Any ideas?
Code:
Function GetPlayerClassSprite(ByVal Index As Long) As Long
Dim Sex As Byte
Player(Index).Char(Player(Index).CharNum).Sex = Sex
If Sex = 0 Then
GetPlayerClassSprite = Int(Class(GetPlayerClass(Index)).MSprite)
Else
GetPlayerClassSprite = Int(Class(GetPlayerClass(Index)).FSprite)
End If
End Function
I have tested the GetPlayerClass(Index) elsewhere and it works fine. Also if I replace the GetPlayerClass(Index) with 1 it returns the proper numbers for thats classes sprites. Any ideas?