06-07-2009, 12:04 PM
Matt Wrote:Possibly not setting the scrlframe value to whatever the value you saved to the item, properly.
Whenever I save an spell, I can open it fine and it displays the correct picture.
Code:
' :::::::::::::::::::
' :: Spells packet ::
' :::::::::::::::::::
Private Sub HandleSpells(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
Dim i As Long
Dim j As Long
Dim n As Long
Dim k As Long
Dim Buffer As clsBuffer
Set Buffer = New clsBuffer
Buffer.WriteBytes Data()
With frmSpells
.Visible = True
For i = 1 To MAX_PLAYER_SPELLS
k = Buffer.ReadLong
PlayerSpells(k) = Buffer.ReadLong
Next
' Put spells known in player record
For i = 1 To MAX_PLAYER_SPELLS
If PlayerSpells(i) 0 Then
.picSpell(Int(i - 1)).Picture = LoadPicture(App.Path & "\gfx\spells\icons\" & Trim$(Spell(i).Frame) & ".bmp")
Else
.picSpell(Int(i - 1)).Picture = Nothing
End If
Next
End With
End Sub
Code:
.picSpell(Int(i - 1)).Picture = LoadPicture(App.Path & "\gfx\spells\icons\" & Trim$(Spell(i).Frame) & ".bmp")
Code:
.scrlFrame = Spell(EditorIndex).Frame