I'm afraid I have another problem here.
On the server code I have the following:
- Code: Select all
int itemIDSell= message.GetInt(0); //The problem arises when this is 0;
player.RefreshPlayerObject(delegate()
{
player.PlayerObject.GetArray("Inventory").RemoveAt(itemIDSell); // Problem: When itemIDSell is 0, it removes the final item within the array.
player.PlayerObject.Save(false, false, delegate()
{
player.Send("SoldItem");
});
});
Any itemID other than 0 works perfectly fine. Any idea why RemoveAt(0) is deleting the last item within the array, instead of the first?
Thanks again,
Fuzzy