Variables Won't Appear In Inspector

I was trying to write a script last night, but the variables wouldn’t appear in the inspector. I verified carefully that I had no compiler errors, and my syntax was correct. Finally I just got frustrated, deleted the entire script (there are no errors on any other script because it was working fine up until I tried to write this script) No errors appear in the console, even when I hit play. I experimented, and I wrote a super simple script including only an empty function update and one variable above it.

var item : GameObject;

function Update () {

}

That’s it. It still wouldn’t appear. Is there an error in Unity itself causing this?

Make sure they are public and not static. If you’re using javascript, also make sure it doesn’t have the “internal” modifier.