- Home /
Poblem in My Code
Hey I have a problem saying that I have an unexpected symbol 'cnt'. It's in the for loop line of code. Ummm well this is my code:
using UnityEngine;
using System.Collections;
using System;
public class CharacterGenerator : MonoBehaviour {
private PlayerCharacter _toon;
// Use this for initialization
void Start () {
_toon = new PlayerCharacter();
_toon.Awake();
}
// Update is called once per frame
void Update () {
}
void OnGUI() {
GUI.Label(new Rect(10, 10, 50, 25), "Name:");
_toon.Name = GUI.TextArea(new Rect(65, 10, 100, 25), _toon.Name);
for(int cnt = 0; cnt < Enum.GetValues(typeof(AttributeName)).Length cnt++) {
}
}
}
Comment
Best Answer
Answer by AlucardJay · Nov 11, 2012 at 05:29 AM
Missing a semi-colon after Length =]
for(int cnt = 0; cnt < Enum.GetValues(typeof(AttributeName)).Length; cnt++)
Hi, if this worked, could you mark it as answered (your karma will rise too!), thanks =]
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Talking Code 2 Answers
Distribute terrain in zones 3 Answers
Ref modifier 1 Answer
2-Dimensional Array Error [CLOSED] 1 Answer