I have a system set up so that when I press a key a new AI is created with (almost) random stats. I want to store these stats in a table. I have 2 variables, PlayerStats (structure of individual stats) and AllStats (an array based on the same structure). My probably flawed logic was that I could append the first created AI’s stats to the AllStats array and create a row, then append the next one to create another row. The issue I have is that when I test out the code and print the ‘last index’ number to the screen it is always the same. Have I missed something obvious, or am I trying to achieve a feat that cannot be done. I hoped to record each row number as a separate variable for other players to access it.
If anyone can point me in the right direction it would be great.