Let me start by saying I have read the manual (twice) and I've looked at various finished scripts. I'm completely new to this particular type of programming so I've been trying to reverse engineer existing scripts without a full grasp of the basics.
As a result: Problems.
What this part (pasted...