Actually, after my first post I started figuring out what exactly was wrong. I only went back here after I had completed my scripts, and I didn't take even the idea from Nevyn. We created the same script in parallel--I wasn't just copying off of him.
Seriously, I worked this out on my own. I saw Nevyn's post while I was making my reply.