So, I get these three errors with this code. Any help?
Assets/Scripts/ToolsChanger.js(10,32): BCE0044: expecting ), found ‘=’.
Assets/Scripts/ToolsChanger.js(10,34): BCE0043: Unexpected token: 0.
Assets/Scripts/ToolsChanger.js(11,36): BCE0044: expecting :, found ‘=’.
var Tools : Tools; //This will become a link to your player tool GUI.
var ToolsCount = 0;
function Start () {
Tools = FindObjectOfType(GUI); //This caches a link to that script.
}
function Update () {
if (Input.GetKeyDown ("q")) {
if (ToolsCount = 0) {
ToolsCount = 1;
}
}
if (Input.GetKeyDown ("q")) {
if (ToolsCount = 1) {
ToolsCount = 2;
}
}
if (Input.GetKeyDown ("q")) {
if (ToolsCount = 2) {
ToolsCount = 3;
}
}
if (Input.GetKeyDown ("q")) {
if (ToolsCount = 3) {
ToolsCount = 1;
}
}