Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Show Item-Data
#1
Hi, i have a smal problem to get the Itemdata. I used the Vis-Inv Tutorial fom the Tut-Section.
I dont realy know how i can make it else:

Code:
Dim d As Long
For d = 1 To 12
On Error Resume Next
If Index = d Then
    lstInv.Selected(d) = True
    If Item(GetPlayerInvItemNum(MyIndex, lstInv.SelCount + d - 1)).Name = "" Then
        IName.Caption = ""
    Else
        If Item(GetPlayerInvItemNum(MyIndex, d)).Type = ITEM_TYPE_CURRENCY Then
            IName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d)).Name) & " (" & GetPlayerInvItemValue(MyIndex, d) & ")"
            
        Else
                ' Check if this item is being worn
            If GetPlayerWeaponSlot(MyIndex) = d Or GetPlayerArmorSlot(MyIndex) = d Or GetPlayerHelmetSlot(MyIndex) = d Or GetPlayerShieldSlot(MyIndex) = d Then
                IName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d)).Name) & " (angelegt)"

                'Here i want to show the Damage/Armor
                Me.lbl_wert.Caption = "Schaden/Rüstung: " & Trim(Item(GetPlayerInvItemNum(MyIndex, d).Data2))
                
            Else
                IName.Caption = Trim(Item(GetPlayerInvItemNum(MyIndex, d)).Name)
                
            End If
        End If
    End If
End If
Next d

And every Time the Value i get is 0.
Reply
#2
Please post it with code tags and indents, then I will help.
Reply
#3
k, i editet it....
Reply
#4
Where do you have this code?
Reply
#5
frmMirage.... On the picInv_Click... Imade with a Tutorial a visual Inventory and the code shows what happend when i click on one of the Inv_Slots.
Reply
#6
Then start with remoing the for loop, cause you get the index from the inv slot you pressed on.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)