-7

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:

2

2 Answers 2

2

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.

1

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.

3
  • Oke...I get it..But what i need to do? Just to add } ? Nov 28, 2015 at 18:28
  • The error description shows line 9 - so your problem is on line 9. The description shows '} missing', so you're missing a brace on line 9.
    – Alex
    Nov 28, 2015 at 18:29
  • 1
    @AleksejJovanovic - For every { there must be a }. -- Maybe you should start here.
    – Corak
    Nov 28, 2015 at 18:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.