- Home /
Question by
aleksandrcooper · Nov 27, 2015 at 10:06 AM ·
c#errorarrayquest
Npc Quest System Array Error
Ive got a script from a YouTube tutorial on how to make an NPC quest system. Ive done everything the same way that the guy in the video does, but I get an array error.
GUILayout.Label(Questions[0]);
GUILayout.Label(Questions[1]);
if (GUILayout.Button(answerButtons[0])){
ActivateQuest = true;
HasDoneQuest = false;
DisplayDialog = false;
enableMouse();
}
if(GUILayout.Button(answerButtons[1])){
DisplayDialog = false;
enableMouse();
}
}
if(DisplayDialog && ActivateQuest && HasDoneQuest){
disableMouse();
GUILayout.Label (Questions[2]);
if(GUILayout.Button(answerButtons[2])){
QuestCompleted();
DisplayDialog = false;
enableMouse();
}
}
The second line is what it tells me has an error, but I'm not even sure how I am exceeding the bounds of the array....
Help would be appreciated.
Comment
Your answer
Follow this Question
Related Questions
NullReferenceException error in an array of objects 0 Answers
Array index out of range error 1 Answer
NullReferenceError, Tilemap Array with Transforms and Raycast (C# with Demo) 0 Answers
Getting ArgumentOutOfRangeException on array c# 1 Answer
GUISttyle NullReferenceException error. what am I missing ? 1 Answer