Errors on Script?
How do I fix these errors?:
It is for a dialogue script.
Ins$$anonymous$$d of taking a screen shot could you copy paste the code, but don't delete the screen shot.
I am on a different computer right now, but when I get back on the computer I coded with, I will paste the script for you.
Here you go:
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class Dialouge : $$anonymous$$onoBehaviour {
public bool Talk;
public bool TextOpt;
public bool LargeOpt;
public int $$anonymous$$axOpt;
public int SelectedOpt;
public int Box;
public int TalkingTarget;
public string Text;
public bool Restart;
void Awake()
{
if (Restart)
{ //If restarting
Box = 0; //put the box to 0
}
DialogBox.Visible = true; //Shows the box (YOU WILL PROBABLY HAVE TO CHANGE)
if (Talk == false)
{ //If not continuing a dialog
Talk = true; //Then start one
Box = 0; //from the beginning
CurrentDialog = Dialog; //and record what dialog is being started
}
if (!Restart)
Box += 1; //Progress a box
if (TextOpt == false)
{ //If it's not a choice,
OptionBox.Visible = false; //Don't show the options.
}
DialogBox.Text = Text; //Display the text!
if (!Talk)
{ //If no longer talking,
txtDialog.Visible = false; //close the box
}
if (!TextOpt)
{ //If there isn't a choice,
txtOption.Visible = false; //Don't show the options
}
}
}
I actually fixed some of the errors, the true and false ones but there are still more errors. Thanks for helping! @$$anonymous$$uffin$$anonymous$$an101010
Answer by Landern · Jul 20, 2016 at 12:36 PM
Boolean values in c# and other languages are case sensitive, all your "True/False" values need to be adjusted to all lower case, this is why it can not find the definition for this keyword in this case.
tl;dr: boolean values are lower case.
Your answer
Follow this Question
Related Questions
I have an error on a C# script @username 2 Answers
Nav Mesh Problem with SetDestination 1 Answer
Realidad aumentada Vuforia problema creando apk 0 Answers