Answer the question
In order to leave comments, you need to log in
How to fix error cs1519?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class mainMENU : MonoBehaviour
{
[SerializeField] int money;
public Text moneyText;
public void ButtonClick();
public bool isMulti = false;
{
money++;
}
// Update is called once per frame
void Update()
{
moneyText.text = "вы погладили леона: " + money.ToString() + " раз";
}
public void BuyMulti()
{
if (money >= 100 && isMulti == false)
{
isMulti = true;
money -= 100;
PlayerPrefs.SetInt("Money",money);
PlayerPrefs.SetInt("isMulti",isMulti ? 1 : 0);
}
}
if (isMulti == true)
{
money += 1000;
}
}
Answer the question
In order to leave comments, you need to log in
Your brackets are crooked.
And it is specific at you if outside of a method - most likely the superfluous closing bracket.
If you press the "format document" button, you can even visually see where everything breaks
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question