I’ve already read this article. How I can create a Javascript object in a unity Script? - Questions & Answers - Unity Discussions
All over this program, the declarations of this class are saying Cannot convert ‘void’ to ‘Object’.
var temp = new Card("Ace", "Spades");
The class is declared as such:
static var title;
static var suit;
static function Card(title, suit)
{
this.title = title;
this.suit = suit;
if(title == "ace")
this.valu = 1;
else if(title == "jack" || title == "queen" || title == "king")
this.valu = 10;
else
this.valu = title;
}