简体   繁体   中英

C# Error CS1513

I don't understand what is causing a CS1513 error. I'm using Microsoft Visual Studio.

Here's my code:

using UnityEngine;
using System.Collections;

public class GameStarted : MonoBehaviour {

void GameStartMsg()
{
    Debug.Log("Game started!");
}

That's all I see:

The only thing wrong is you need to add a curly brace to the end of your code at line nine. That will get rid of the error. CS1513 error = missing closing bracket.

Please attempt to answer questions yourself.

Googling 'error CS1513' lead to this page as the first result - https://msdn.microsoft.com/en-us/library/83ht1k63%28v=vs.90%29.aspx?f=255&MSPPError=-2147217396

Grant Winney's comment is correct, missing brace.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM