Hi,
I'm getting a "Object reference not set to an instance of an object" error in this code:
I already tried many ways to fix it but it didn't work, so I would really appreciate if You would help me solve this problem. Thanks in advance.
I'm getting a "Object reference not set to an instance of an object" error in this code:
Code:
If InvWList.SelectedItem = Nothing And InvAList.SelectedItem = Nothing Then
MsgBox("Select an item to drop")
ElseIf InvEqItems.Items.Contains(InvWList.SelectedItem.ToString) Or InvEqItems.Items.Contains(InvAList.SelectedItem.ToString) Then
MsgBox("You have to unequip the item you want to drop")
Else
invDropResult = MsgBox("Are you sure you want to drop " & InvWList.SelectedItem.ToString & "?", MsgBoxStyle.YesNo)
End If