R
Rodimus
Guest
Hello!
I have an object named o Client. It connects to the rever without problem.
I have an oServer object, wich is the server, and accepte o Client's connecton without problem.
I want to send packet from the Client, but i I set up the recieving in oServer's Async Networking event the game crush with error "buffer_read argument 1 incorrect type (undefined) expectiong number(YYGI32)".
Thisi s how I set up the server part (FEED_CLIENT is a constant with value 0):
var b = ds_map_find_value(async_load,"buffer");
var cmd = buffer_read(b,buffer_u16);
switch(cmd)
{
case (FEED_CLIENT):
show_debug_message("Hello Too");
break;
}
At this point not even try to send any packet from the client, but the game crashes.
What I do wrong?
I have an object named o Client. It connects to the rever without problem.
I have an oServer object, wich is the server, and accepte o Client's connecton without problem.
I want to send packet from the Client, but i I set up the recieving in oServer's Async Networking event the game crush with error "buffer_read argument 1 incorrect type (undefined) expectiong number(YYGI32)".
Thisi s how I set up the server part (FEED_CLIENT is a constant with value 0):
var b = ds_map_find_value(async_load,"buffer");
var cmd = buffer_read(b,buffer_u16);
switch(cmd)
{
case (FEED_CLIENT):
show_debug_message("Hello Too");
break;
}
At this point not even try to send any packet from the client, but the game crashes.
What I do wrong?