I want to use this wrapper in MonoGame but I get an error message if I use the code from the wrapper website.
I downloaded the wrapper project and added the project to my solution in Visual Studio. After that, I created a reference from my project to the wrapper project.
Then, I copied this code to my project:
var client = new StatsIOClient("Client-ID", "Client-Secret");
await client.Statistics.CreateAsync("Stats-Id", "Username");
But something went wrong, because I get these error message:
Error CS1501: No overload for method 'CreateAsync' takes 2 arguments (CS1501)
What is wrong with the code? How can I use the wrapper project in my Visual Studio project to send and receive leaderboard scores?
Dropbox link to my Visual Studio project: my project
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using StatsIO.Objects;
using StatsIO;
namespace LeaderboardTest
{
public class Game1 : Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
public async void NewClient()
{
var client = new StatsIOClient("Client-ID", "Client-Secret");
await client.Statistics.CreateAsync("Stats-Id", "Username");
}
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
graphics.IsFullScreen = true;
}
protected override void Initialize()
{
base.Initialize();
}
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
NewClient();
}
protected override void Update(GameTime gameTime)
{
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
graphics.GraphicsDevice.Clear(Color.CornflowerBlue);
base.Draw(gameTime);
}
}
}