i am getting this error Error: Failed to invoke 'MoveLobbyCard' due to an error on the server. when trying to perform an action in lobby my js code:
"use strict";
var connection = new signalR.HubConnectionBuilder().withUrl("/hub").build();
connection.start().then(function () {
}).catch(function (err) {
return console.error(err.toString());
});
connection.on("UserConnected", function (ConnectionId) {
$("#userlist").append($("<li>").text(ConnectionId + "has joined"));
var lobbyID = $('#lobbyID').text();
connection.invoke("JoinLobby", lobbyID).catch(function (err) {
return console.error(err.toString());
});
});
connection.on("CardMoved", function (id) {
$('#'+id).addClass("moved");
});
$('.card').on("click", function (){
var id = $(this).attr("id");
connection.invoke("MoveLobbyCard",id,lobbyID).catch(function (err) {
return console.error(err.toString());
});
});
it does add to groups but i have no idea whats causing the error