C# score script

Hello, I am currantly working on a game where the player must collect orbs, every time the player collects an orb the score goes up.

The only problem is that I keep getting this error that I have no clue what it means.

here is the error:

ArgumentException: You are not allowed to call Internal_Create when declaring a variable.
Move it to the line after without a variable declaration.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
UnityEngine.Texture2D..ctor (Int32 width, Int32 height) (at E:/BuildAgent/work/68355d6e5d19d587/Runtime/Export/Generated/Graphics.cs:922)
Score..ctor ()

And here are the 2 scripts I am useing (one for the orb and one for the GUI texture)

using UnityEngine;
using System.Collections;

public class Orb : MonoBehaviour {

	public Transform target;
	
	void OnCollisionEnter(Collision target){
		Score.score += 1;
		Destroy(transform);
	}
}
using UnityEngine;
using System.Collections;

public class Score : MonoBehaviour {
	
	static public int score = 0;
	public Texture2D Score0 = new Texture2D (64, 64);
	public Texture2D Score1 = new Texture2D (64, 64);
	
	// Update is called once per frame
	void update () {
		switch(score){
			case 1:
				guiTexture.texture = Score1;
			break;
			case 0:
				guiTexture.texture = Score0;
			break;
		}
	}
}

any help would be greatly appreciated.

On Score, instead of:

public Texture2D Score0 = new Texture2D (64,64);
public Texture2D Score1 = new Texture2D (64,64);

Make it:

public Texture2D Score0;
	public Texture2D Score1;

	void Start () {
	Score0 = new Texture2D (64,64);
	Score1 = new Texture2D (64,64);
	}

It doesn’t let you do the “new” right after declaring the variable. you need to move it to the awake or start, which is exactly what the error message tells you to do (a bit cryptic, but it’s there).

edit
I might be wrong, but it looks like you’re going to use the case to change the texture (I guess the texture would be the visual representation of the numbers), why not just use an array of textures?
that way you would simply need:

static public int score = 0;
public Texture2D[] Score_Texture; // you would then assign the textures using the editor
void update () {
				guiTexture.texture = Score_Texture[score];
}

Thanks, I did what you said and it really helped out, there where a couple errors with what you suggested but I found out I had to use void OnGUI instead of void update on the score script.