Search Unity

All compiler errors have to be fixed before you can enter playmode!

Discussion in 'Scripting' started by taringa-carp, Jul 26, 2018.

  1. taringa-carp

    taringa-carp

    Joined:
    Jul 26, 2018
    Posts:
    2
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class PrimerScript : MonoBehaviour {
    6.  
    7.     public string playerName = "Unknown";
    8.     public int playerScore = 0;
    9.     public int maxScore = 100;
    10.  
    11.     public int playerAge = 0;
    12.  
    13.  
    14.     // Use this for initialization
    15.     void Start ()
    16.  
    17.         Debug.Log (maxScore + 10);
    18.      
    19.     }
    20.  
    21.     // Update is called once per frame
    22.     void Update () {
    23.      
    24.     }
    25. }
    26.  




    Soo... what's the problem? Why i get this error?

    I used print also and its the same
     
    Last edited: Jul 26, 2018
  2. GamerJoHo

    GamerJoHo

    Joined:
    Oct 29, 2016
    Posts:
    17
    Missing a '{' before Start() :)
     
    taringa-carp likes this.
  3. taringa-carp

    taringa-carp

    Joined:
    Jul 26, 2018
    Posts:
    2
    you are a beast hahaha and i am so dumb, thx