- Home /
Experience and Level System
I followed a tutorial on making Leveling System, and got following errors. Line 22, Unexpected symbol '}' Line 34, Parsing Error. Any help? : `using UnityEngine; using System.Collections;
public class PlayerLevelSystem : MonoBehaviour { private int curLevel = 1; private int maxLevel; private int curExp = 0; private int maxExp = 100;
// Use this for initialization void Start () { } // Update is called once per frame void Update () { if(curExp >= maxExp) } curExp=100; curLevel++; } void OnGUI() { GUILayout.BeginArea(new Rect(20,50,40,20), curexp + "/" + maxExp); GUILayout.BeginArea(new Rect(20,50,40,20), "Level:" + curLevel); }
Answer by chrisjjones · Aug 27, 2012 at 04:38 PM
It looks like there is an extra '}' right after the first if statement in the Update method.
Also, I don't see the closing '}' for the class either. Maybe it's just the formatting?
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Accuracy doesn't work. No enemies showing up. 1 Answer
drawing a line following an object 3 Answers
why when i try to add my script to the "player" it says can not can not add script 1 Answer
Wall Issue 1 Answer