I am checking 2 different arrays and see if their values are equal. I have an array of weapons and array of the players inventory, I am checking to make sure that if the player has the weapon in the inventory then we don’t duplicate it or equip it. I am trying to do 2 foreachloop’s one inside the other but the probem is that the second foreachloop loop body does not execute. Check the image below:
What am I doing wrong? Is there another method for checking 2 different arrays?