Forum begins after the advertisement:

[Part 15]I can’t create Knife

Viewing 16 post (of 16 total)
  • Author
  • #13325

    That’s strange. Do you notice that your slotNum is returning -1? This means that this loop in your code is not running entirely (otherwise slotNum will be any number other than -1):

            for (int i = 0; i < weaponSlots.Capacity; i++)
                if (weaponSlots[i].IsEmpty())
                    slotNum = i;

    The only way it does not run, is if your weaponSlots variable has a capacity of 0. Can you try changing weaponSlots.Capacity to weaponSlots.Count instead and see if it fixes the issue?

Viewing 16 post (of 16 total)
  • You must be logged in to reply to this topic.

Go to Login Page →

Advertisement below: