28-02-2009, 11:13 PM
Obvious title.
Right, well I wrote a public function and called it when ever the value of the the item Gold in my inventory changed.
You can see it below.
[spoiler][/spoiler]
That is supposed to check the Inventory, if it finds an item of Currency type then it will change the caption of lblGold to the value of said item.
I tried changing it to a Sub instead of a function too. Moved it around and all. Still it doens't change the label.
Again, obviously I have done it wrong.
Anyone help me out?
Right, well I wrote a public function and called it when ever the value of the the item Gold in my inventory changed.
You can see it below.
[spoiler]
Code:
Public Function GetGold(ByVal Index As Long)
Dim i As Long
For i = 1 To MAX_INV
If Item(GetPlayerInvItemNum(Index, i)).Type = ITEM_TYPE_CURRENCY Then
frmMirage.lblGold.Caption = GetPlayerInvItemValue(Index, i)
End If
Next
End Function
That is supposed to check the Inventory, if it finds an item of Currency type then it will change the caption of lblGold to the value of said item.
I tried changing it to a Sub instead of a function too. Moved it around and all. Still it doens't change the label.
Again, obviously I have done it wrong.
Anyone help me out?