Okay, I am very new to Unity but whenever i try something it called an error on the brackets but there is nothing wrong with them.
So I typed a very simple C# script like so-
using UnityEngine;
using System.Collections;
public class Dude : MonoBehaviour {
public int health;
void Start ()
{
health = 100;
print ( " Dude's Health: " + health )
}
And it keeps calling random Parsing errors on the brackets and parenthesis! Please help me!
Comment
You have 3 curly brackets in your code, which strongly suggests all of them don't have a pair
Best Answer
Answer by M-Hanssen · May 18, 2016 at 02:49 PM
Please educate yourself in coding C# before asking these absurd questions...
You were missing a semicolon! I felt free to correct your syntaxes...
using UnityEngine;
using System.Collections;
public class Dude : MonoBehaviour
{
public int Health;
protected void Start()
{
Health = 100;
Debug.Log(" Dude's Health: " + Health);
}
}
Sorry I Posted this before i was even ready to start coding at all
Your answer
Follow this Question
Related Questions
I have this movement script that works just fine, but how do i integrate jumping and running? 0 Answers
The laser problems 0 Answers
how to make a max number on counter. 1 Answer
Health Script 2 Answers