Question by
TheEpicMaster747 · Jan 20, 2017 at 02:06 AM ·
c#codepage
am getting error CS1519 and I don't know why. If anybody can find out what's wrong. I'm new to C# soooo yeah I'm noob. Assets/Scraips/UpgradeManager.cs(10,1): error CS1519: Unexpected symbol `}' in class, struct, or interface member declaration
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UpgradeManager : MonoBehaviour {
public Click click;
public UnityEngine.UI.Text itemInfo;
public float cost;
public int count = 0;
public int clickPower;
public string itemName;
private float _newCost;
void Update() {
itemInfo.text = itemName = "\nCost: " + cost + "\nPower: +" + clickPower;
}
public void PurchasedUpgrade() {
if (click.Money >= cost) {
click.Money -= cost;
count += 1;
click.MoneyPerClick += clickPower;
cost = Mathf.Round (cost * 1.15f);
_newCost = Mathf.Pow (cost, _newCost = cost);
}
}
}
Comment
I've had to comment out the lines with "Click" in them since I do not have that class, however when I do that I have no errors with this script, are you sure there are no unsaved changes to the script?