A
Apkyesamo
Guest
Hi!
I need some help with the built in networking functions.
I'm trying to send data from the server to the client. My code looks something like this:
//Server side (async networking event)
if (type == network_type_data)
{
And whenever I send something from a Client I get the error "network_send_packet argument 1 incorrect type (5) expecting a Number (YYGI32)"
I understand that clientSocket obviously isn't an integer, but the required argument clearly says that it needs a socket.
Could you please explain what exactly happens here, and how i would fix this? (Using GM:S 1.4)
Thanks in advance!
I need some help with the built in networking functions.
I'm trying to send data from the server to the client. My code looks something like this:
//Server side (async networking event)
if (type == network_type_data)
{
clientSocket = ds_map_find_value(async_load, "socket");
buffer_seek(buff, buffer_seek_start, 0);
buffer_write(buff, buffer_u8, 123);
network_send_packet(clientSocket, buff, buffer_tell(buff));
}buffer_seek(buff, buffer_seek_start, 0);
buffer_write(buff, buffer_u8, 123);
network_send_packet(clientSocket, buff, buffer_tell(buff));
And whenever I send something from a Client I get the error "network_send_packet argument 1 incorrect type (5) expecting a Number (YYGI32)"
I understand that clientSocket obviously isn't an integer, but the required argument clearly says that it needs a socket.
Could you please explain what exactly happens here, and how i would fix this? (Using GM:S 1.4)
Thanks in advance!
Last edited by a moderator: