Anwell Flappy Bird - Random in Unity3D 5?

I worked through Anwell’s Flappy Bird tutorial using Unity3D 5 - http://anwell.me/articles/unity3d-flappy-bird/. Many thanks to him for posting this lesson. Since the tutorial was written using Unity3D 4 and I am using 5, I had to make one small change at the beginning to get most things to work. I ran into a road block when I tried to make the obstacles (rockPair) change their Y position randomly. This is near the bottom of the lesson. I get several errors when I add this line of code to the ‘obstacle.cs’ script:

transform.position = new Vector3(transform.position.x, transform.position.y - range * Random.value, transform.position.z);

Errors:
The name ‘range’ does not exist in the current context.
The best overloaded method match for UnityEngine.Vector3 … has some invalid arguments.
Argument ‘Number 2’ cannot convert ‘object’ expression to type ‘float.’
An object reference is required to access non-static member ‘UnityEngine.Transform.position.’

I tried several things with no luck. For now I have commented out the line and lived with the random Y position. Any suggestions would be appreciated. Thanks.

It says there in the first line. The “range” variable doesn’t exist.

Whoops. Sure enough, I left out the declaration of the ‘range’ variable. I feel a little silly. Adding ‘public float range = 4;’ eliminates three of the four errors. I still get error that says, 'An object reference is required to access non-static member ‘UnityEngine.Transform.position.’ Any ideas why this is popping up? Thanks Stardog, for your very quick reply.

Okay, I figured it out. I still had ‘using System.Collections;’ on the second line. Deleting this made it work properly.