I have a problem with the on_server event and the send_data_to function. I want to know what was send with the send_data_to function to the server.
The same like I want for send_data_to is possible with the send_var_to and the send_str_to functions for example like this:
var my_var = 1;
void my_func(void* para, var client_id)
{
if (event_type == EVENT_VAR)
{
if (para == &my_var) {...}
}
}
But it's not working with send_data_to:
typedef struct my_struct
{
char *my_string1;
char *my_string2;
} my_struct;
my_struct* my_data = {my_string1 = "a"; my_string2 = "b";}
void my_func(void* para, var client_id)
{
if (event_type == EVENT_DATA)
{
if (para == &my_data) {...}
}
}
Does anyone know how this should work?
[EDIT]
I tested with...
send_data_to(NULL, my_data, sizeof(my_data));
...and...
send_data_to(NULL, &my_data, sizeof(my_data));
...and I use the Beta for testing. (The 7.07 has a bug with send_data_to!)