After a brief look, I noticed something in this line:
function SnapShot_Event() { if(me!=render_view.genius) return(1); }
You want it to return 1, but only if (me!=render_view.genius). But, if you put nothing like "else return 0;", the return value is RANDOM if me==render_view.genius. I don't know if that causes the problem or if it is even related to it, but it's the first thing I saw that could cause random problems - and you have a random problem.