17-03-2008, 10:20 AM
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:
And every Time the Value i get is 0.
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.