will someone tell me why this one won’t work. hand and playerdeck are dcard lists.
tempcard= playerdeck ;
I get a “NullReferenceException: Object reference not set to an instance of an object” error when I add the tempcard to the hand. any ideas?
There is not enough information here to help you. What line is giving you an exception? Can you post the playerdeck code? Where is hand created?
If I had to guess, it would be that playerdeck or hand has not been created anywhere, i.e. you just have something like this:
you need to instantiate hand:
List<Dcard> hand = new List<Dcard>();