var quest:quests[];
class quests
{
var questkills:int;
var questtaken:int;
var questcompleted:int;
}
function Start()
{
quest=new quests[2];
for (var i=0;i!=2;i++)
{
quests[i].questkills=0;
quests[i].questtaken=0;
quests[i].questcompleted=0;
}
}
function OnGUI()
{
GUILayout.Label("kills:"+quest[1].questkills);
}
This is giving me the Error: “Object reference not set to an instance of an object”
Please help - Thanks Utaelilya