Do I have to work with strings?
I need to send a Variable, and sending X as a message, sends X as a message not as the Variable X data.
So I tried to change it a bit:
<img src="http://imageshack.us/a/img16/1664/clientside.png" border="0" />
And Serverside:
var entities = [], count = 0;
var io = require("socket.io").listen(80);
var x = 50;
function sendPos()
{
io.sockets.emit("message", x);
}
setInterval(sendPos, 1000);
But then I get this Error:
<img src="http://imageshack.us/a/img26/9178/localhosterror.png" border="0" />