Limiting a rigidbody's velocity.

I am new to unity and C# and I am trying to limit the velocity of a rigidbody. I am using this script but it says ‘,’ expected and I put in a “,” and it says "only assignment, call, increment, decrement and new object expressions can be used as a statement for the whole line.

using UnityEngine;
using System.Collections;

[RequireComponent(typeof(Rigidbody))]
public class NewBehaviourScript : MonoBehaviour
{
    public float maxSpeed = 1000f;

    void Update()
    {
        if (GetComponent<Rigidbody>().velocity.magnitude > maxSpeed)
        {
            (GetComponent<Rigidbody>().velocity = Vector3.ClampMagnitude((GetComponent<Rigidbody>().velocity), maxSpeed)); } //This line
        }
    }

You did simple mistake while writing this. at 13 line you bracketed it with “()” . probably you did copy this from somewhere else. Simply remove these ones so it is

GetComponent<Rigidbody>().velocity = Vector3.ClampMagnitude((GetComponent<Rigidbody>().velocity), maxSpeed);

and NOT

(GetComponent<Rigidbody>().velocity = Vector3.ClampMagnitude((GetComponent<Rigidbody>().velocity), maxSpeed)) ;