Warning on creating an array of class objects

Hi, i have a problem with creating an array of class objects.
I get the warning

You are trying to create a MonoBehaviour using the ‘new’ keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). Alternatively, your script can inherit from ScriptableObject or no base class at all
UnityEngine.MonoBehaviour:.ctor()
Weaponsscript:.ctor(Int32, Int32, String, Int32, Int32)
Weaponsscript:Start() (at Assets/scripts/Weaponsscript.cs:43)

lines(43 and near) are:

public void Start () {

		 weapons = new Weaponsscript[] { // 43 line
			new Weaponsscript(1, 1, "item1", 50, 500),
			new Weaponsscript(2, 0, "item2", 60, 750),
			new Weaponsscript(3, 0, "item3", 75, 1000),
		};

	}

Construcor:

public Weaponsscript(int type, int lvl, string name, int dmg, int costgrowth)

Array declaration

Weaponsscript[] weapons;

Thanks to all who answer.

MonoBehaviour’s are added using AddComponent<>. if you’re class doesn’t need to be a MonoBehaviour, don’t inherit from it…

Either:

a) Weaponsscript is pure c# and doesn’t use any Unity functions, in which case it can be treated like a regular c# class;

or

b) Weaponsscript is a Unity script, in which case it’ll have using UnityEngine; at the top and will derive from MonoBehaviour. These scripts do not use constructors, and instead get added to a GameObject in the inspector, or get added at run time using AddComponent(). (This is what the error message says, btw.)

There’s a pretty good documentation page on this here:

You don’t create instances of classes that inherit from MonoBehaviour directly. You make a new GameObject and then use AddComponent to attach your script.