Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SHOWING GOLD IN LABEL
#1
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]
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
[/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?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)