I am working on making a game where users can collect items. I have chosen to store the ERC721 tokens that represent the items in this way:
I made some functions to test this out:
As seen, getItem does in fact not get an item, but rather how many items a user has. This is done for testing, and will be changed back when it works.
This outputs as follows:
As you see, the createItem adds an item to the array, but when GetItem is called, it is no longer there. When I called createItem from within getItem, it worked as expected. But for some reason this is not working. Can anyone help?