I want to create a list of people who die with their name and occupation and then create a gravestone for them.
public TownDeaths[] ListOfDead;
public class TownDeaths{
public string deadName;
public string deadJob;
public TownDeaths(string name,string job){
deadName = name;
deadJob = job;
}
This is the code I use but I keep getting errors saying “Object reference not set to an instance of an object” whenever I try to create the tombstones. I would also like to know how to add to the list. Possibly even another string or int? Please and Thankyou!!