Hello Unity I Get an Cs0116 ERROR on this script but i dont know whats wrong with it

using UnityEngine;

public class SkylineManager : MonoBehaviour {
	public Transform prefab;
public int numberOfObjects;
public Vector3 startPosition;

private Vector3 nextPosition;

void Start () {
	nextPosition = startPosition;
for (int i = 0; i < numberOfObjects; i++) {
	Transform o = (Transform)Instantiate(prefab);
	o.localPosition = nextPosition;
	nextPosition.x += o.localScale.x;

Your bracketing is messed up. A class must enclose all the functions and variable declarations in the file, so line 6 needs to be moved to the end of the file. Also line 15 -19 need to be in the Start() function, so move line 14 to the end of the file.

In MonoDevelop, if you put your cursor at one bracket, it will hightlight the other. Also proper indentation would help you spot these kinds of errors.