Thank you, Gabba, for your replies. I very much appreciate them. In your first reply you seem to be saying that the method I used (after searching the internet) really does not work anymore and that I really have to use a completely different route, using events. Is that correct? Furthermore, in light of the videos that I watched recently, I was wondering whether the standard method for generating transaction ID’s might involve the use of contract instances. Filip explained how to generate and display transaction hashes in one of his videos.
As far as the code is concerned, I simply took the block that was duplicated and put it intio another async function. First I tried just a regular function, but I was told that the “await” command necessitated the use of async. So I put in async, but then the program would simply stop executing the code and enter into a waiting mode after displaying the last person in the first run of the function. This entering into a pending state caused me to think that there is a problem with asynchronicity (an async function within an async function).
async function addPersonLoop(loopNumber){
for(n=0; n<loopNumber; n++){
let creatorAddress = await instance.getCreators(n);
let person = await instance.getPerson(creatorAddress);
console.log(“Person #” + n +": name: " + person.name + "; age: " + person.age + ";
address: " + creatorAddress + “\n”);
}
)
Finally, concerning your third reply, my observation was that the mapping still worked after a person had been deleted but that the person values were all zero or null. This is not surprising because there is no pop-array command in the contract, but it makes sense as you said to insert such a command in order to save space.