SceneMangement compiling errors

Hello guys. I’m trying to do a main menu like in this video:

After writing the code I get a lot of errors. :frowning:

This is the code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class MainMenu : MonoBehaviour {
 
    public void PlayGame() {
     
        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);

    }
}

And those are the errors: Errors — Postimages

How can I fix them?

Thanks!

Latest edit: The problem has been solved by itself. Thanks for your attention!

How to report your problem productively in the Unity3D forums:

http://plbm.com/?p=220

How to understand errors in general:

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: Using code tags properly