Stuck on this error: Primary constructor body is not allowed

0 c# monodevelop unity-game-engine

I watched some tutorials on Youtube for a scribt I want to have in my Unity project. In minute 28:13 https://www.youtube.com/watch?v=b87iVclVT2E you can see the important part of the scribt and here is my copy of it:

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

public class PlayerMovement : MonoBehaviour {

    public CharacterController2D controller;
    public Animator animator;

    public float runSpeed = 40f;

    float horizontalMove = 0f;
    bool jump = false;
    bool crouch = false;

    void Update(){
        horizontalMove = Input.GetAxisRaw ("Horizontal") * runSpeed;

        animator.SetFloat ("Speed", Mathf.Abs (horizontalMove));

        if (Input.GetButtonDown("Jump"))
        {
            jump = true;
            animator.SetBool("IsJumping", true);
        }

        if (Input.GetButtonDown("Crouch"))
        {
            crouch = true;
        } else if (Input.GetButtonUp("Crouch"))
        {
            crouch = false;
        }
    }

    public void OnLanding ()
    {
        animator.SetBool ("IsJumping", false);
    }

    public void OnCrouching (bool isCrouching);
    {
        animator.SetBool("IsCrouching", isCrouching);
    }

    void FixedUpdate ()
    {
        controller.Move (horizontalMove * Time.fixedDeltaTime, crouch, jump);
        jump = false;
    }
}   


Run Code Online (Sandbox Code Playgroud)

When I tryed it Unity responded with these errors:

    Assets/PlayerMovement.cs(42,2): error CS9010: Primary constructor body is not allowed
    Assets/PlayerMovement.cs(47,2): error CS9010: Primary constructor body is not allowed
    Assets/PlayerMovement.cs(47,2): error CS8041: Primary constructor body is not allowed
Run Code Online (Sandbox Code Playgroud)

I would be nice if you could help :D LG Nick

Bri*_*den 6

The issue is a semicolon that should not be there, on this line of code:

public void OnCrouching (bool isCrouching); //there should not be a semicolon here
{
    animator.SetBool("IsCrouching", isCrouching);
}
Run Code Online (Sandbox Code Playgroud)

Change to

public void OnCrouching (bool isCrouching)
{
    animator.SetBool("IsCrouching", isCrouching);
}
Run Code Online (Sandbox Code Playgroud)