The gun exploded and James was killed. James' son succeeded to the throne as James III. He was still a child and so the Stewart monarchy had another minority kingship to survive.