Why is this error happening?
<script type="text/javascript">
var player;
var sdk;
var ysdk;
YaGames.init().then(ysdk => {
console.log('Yandex SDK initialized');
window.ysdk = ysdk;
});
ysdk.getPlayer()
player.setData({
Save: ['G.Egs'],
}).then(() => {
console.log('data is set');
});
</script>
I’m a beginner and don’t really understand why it doesn’t work
documentation
Unfortunately it is in Russian, but I hope you can explain what I’m doing wrong