When you get a message like this:

Error in 'line 44:
'Delay' undeclared identifier
> crossed = Delay; <

you'll know that you've forgotten to define the variable "Delay" before using it in line 44.