Search Unity

error CS1519: Unexpected symbol `}' in class, struct, or interface member declaration

Discussion in 'Scripting' started by SlenderBoy302, May 29, 2018.

  1. SlenderBoy302

    SlenderBoy302

    Joined:
    Apr 23, 2017
    Posts:
    7
    Hi, I'm getting an error code for my dialogue system. Here's the script:
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. [System.Serializable]
    6. public class Dialogue {
    7.  
    8.     public string name;
    9.     public string[] sentences;
    10. }
    11.  
     
  2. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    Are you certain that's the right file, and those are its full contents? Everything looks okay to me.
     
    TaleOf4Gamers likes this.
  3. TaleOf4Gamers

    TaleOf4Gamers

    Joined:
    Nov 15, 2013
    Posts:
    825
    You should post the entire error message, it tell you which script is causing the error and exactly the line it thinks the error is occuring.