> For the complete documentation index, see [llms.txt](https://gley.gitbook.io/easy-achievements/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gley.gitbook.io/easy-achievements/complete-api/submitscore.md).

# SubmitScore

## Description

Submits the score a specific leaderboard.

## Declaration

```csharp
 public static void SubmitScore(long score, LeaderboardNames leaderboardName, UnityAction<bool, GameServicesError> submitComplete = null)
```

## Parameters

<table><thead><tr><th width="206">Name</th><th>Description</th></tr></thead><tbody><tr><td><strong>score</strong></td><td>The player's score</td></tr><tr><td><strong>leaderboardName</strong></td><td><p>LeaderboardsNamesis an enum auto-generated when you use the SettingsWindow to set up the plugin.</p><p>It contains all your leaderboards so it is easy for you to call it from your code.</p></td></tr><tr><td><strong>submitComplete</strong></td><td>Callback called after submit process ends.<br>bool true -> score submitted successfully <br>bool false -> failed -> you get a <strong>GameServicesError</strong> </td></tr></tbody></table>

## Example

```csharp
using Gley.GameServices;
public class Test : MonoBehaviour
{
    long score = 100;
    public void SubmitScore()
    {
        Gley.GameServices.API.SubmitScore(score, LeaderboardNames.HighestJumpers, SubmitComplete);
    }

    private void SubmitComplete(bool success, GameServicesError message)
    {
        if (success)
        {
            //score successfully submitted
        }
        else
        {
            //an error occurred
            Debug.LogError("Score failed to submit: " + message);
        }
    }
}
```
