How can I make this code work I am getting the BCE0005: Unknown identifier: 'ScoringSystem'?

var StarScore : int = 25;
var StarSound : AudioSource;

function OnTriggerEnter (col : Collider) {
	StarSound.Play();
	ScoringSystem.TheScore += StarScore;
	this.transform.position = Vector3(0, 1000, 0);
	}

So the assumption here is that ScoringSystem exists with a Static variable called TheScore somewhere.

It would look like:

// unityscript (ScoringSystem.js)
public static var TheScore : int;

//or in c#

public class ScoringSystem
{
  public static int TheScore;
}

These types of variables are class members and can be accessed as a single variable.

You may want to watch the learning video on Statics and Unity found here

Since you haven’t added anymore information other then the error… Do you have a class or a javascript/unityscript file called ScoringSystem? If so, is it in c# or javascript/unityscript? Is the build order correct if mixing script types - if applicable?

There is no error except for one thing

The enum or class Scoring system is not actually declared in your script

You should do this:

//UJS Unity Javascript
//To store list of strings
public enum ScoringSystem{
  Whatever,
  Whatever,
  Whatever
}

or

//To store a system of script

public class ScoringSystem{
   //your code
}