getting loop errors, need help

Im experimenting with loops and am getting errors such as “Assets/Loops.cs(36,22): error CS0103: The name `i’ does not exist in the current context”

any ideas why?

using UnityEngine;
using System.Collections;

public class Loops : MonoBehaviour {

public class Target {//start class definition

// properties
public int id;	
public string type;
public string name;
public int lvl;
public int health;

// A Method
public void targetInfo () {
	print("unit: " + id);	
	print("ID: " + name);
	print("class: " + type);
	print("level: " + lvl);
	print("health: " + health);
	}
	
} //end of class definition

//-------------------------------

// Use this for initialization
void Start () {

	Target[] unit = new Target[51];//create array
	
for (int i = 1; i <= 50; i++);
	{
		
	unit *= new Target();//instantiating 50 objects*

_ unit*.id = i;_
_ unit.type = “Merc”;
unit.name = “Yuri”;
unit.lvl = 12;
unit.health = 200;*_

* }*

* for (int i = 1; i <= 10; i++);*
* {*
_ unit*.targetInfo();
}*_

* }*

}

Your issue is on this line:

for (int i = 1; i <= 50; i++);

See the ‘;’ at the end? That indicates the for() loop is executing an empty statement. That also means that the lines of code beyond are out of scope for ‘i’. Note you’ve made this mistake twice in this script. Remove the ‘;’ both places, and your code will compile fine.