.has not working

I have some code and I used the print() function to test if the code is working.
Weird thing I am detecting if the player position is in an array . I printed the array which was [(0,0), (0,1)] an printed my player position (0,1) which is in the array and I check using .has function and it’s returning false
The code in exact is
If tilePositions.has(vector2i(snappedtileposx, snappedtileposy))) == true:
Tilepositions is the array and snapped position is player position

Does the array have Vector2i elements or Vector2 elements?

There’s no way to check the type of printed things unless they said.

  • Check the type of each element in that array.
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.