N
N
NoobNoob2021-08-05 16:05:49
C++ / C#
NoobNoob, 2021-08-05 16:05:49

Syntaxis error, expected and; expected what to do?

Hello, I was writing a code for a towerplace and these errors appeared in the unit:
610be1a02bb3e445205013.png
Here is the code of the towerplace:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TowerPlace : MonoBehaviour { 

    public GameObject Tower;

    public Vector3 offset;

    public GameObject curTower;

    public bool empty;

    void OnMouseDown()
    {
        if (empty)
        {
            curTower GameObject.Instantiate(Tower,transform.position+offset,Quaternion.identity) as GameObject;
            empty = false;
        }   
    }
}

I hope somebody helps

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Voland69, 2021-08-05
@NoobNoob

After curTower = missing apparently.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question