Compiler errors?

I got this strange error and cant figure how to fix it?

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class Loot : MonoBehaviour {
public float lootwindowheight = 90;
public float Buttonheight = 40;
public float Buttonwidth = 40;
private List _lootItems;
private float OFF_SET = 10;
private const int LOOT_WINDOW_ID = 0;
private Rect _lootWindow = new Rect(0,0,0,0);

// Use this for initialization
void Start () {
   _lootItems = new List <Item>();
	
	Populate();
}

// Update is called once per frame
void Update () {
     
}

 void OnGUI() {
	 _lootWindow = GUI.Window(LOOT_WINDOW_ID, new Rect(OFF_SET, Screen.height - (OFF_SET + lootwindowheight), Screen.width - (OFF_SET * 2), lootwindowheight), LootWindow, "Loot Window");
 }
 
 private void LootWindow(int id) {
	 for(int cnt = 0; cnt < _lootItems.Count; cnt++) {
		 GUI.Button(new Rect(Buttonwidth * cnt, 0, Buttonwidth, Buttonheight), cnt.ToString());
	 }
 }
 
 private void Populate() {
	 for(int cnt = 0; cnt < 25; cnt++)
	 _lootItems.Add(new Items());
 }

}

then there is no class called Item thats present in this or an earlier compile step.

See the advanced manual on compilation order to know whats being compiled first to ensure that this class here is not within that one.
Should you mix C# and UnityScript it will also tell you what to keep in mind to have one of them use the other

Specifically, what is the error you’re getting. Just copy and paste it.
I’m inclined to believe that the error stems from the fact that you created an untyped private list and the tried to initialize it with type “item”.

Always post your error if you’re getting one, and always make sure your code is properly formatted before you post your question :slight_smile:

Qato likes to format half of a code block and leave the rest all messed up.