It worked! Thank you TinyScript so much!
I guess the clearing wasn't causing the problem because any one I choose now works.
My code now is:
Code:
c2d.save();
c2d.beginPath();
/* Drawing functions */
c2d.closePath();
c2d.strokeStyle = "#000000";
c2d.stroke();
c2d.restore();
The problem must have been caused by the repeated saving and storing of the paths without them being rendered or something.