The pointers were just trial and error for sending before saving to the struct.

I want to be able to send data to the client, which consists of who sent the data originally, what type of data it is (chat/creating a game/a model name/etc), and the string/char. I can achieve this using string manipulation, but if it's possible via send_data, I'd like to know and how it's possible to achieve this.

Thanks again
MrGuest

EDIT:
Revised question:
How do I get the msg.name displayed as a string? (must still be stored as a char array for sending purposes later)
Code:
// MP_woes.c

#include <acknex.h>
#include <default.c>

typedef struct DATA {
	
	int id;
	int type;
	
	char name[20]; //sends unreadable string using _chr or _str
	
} DATA;

DATA msg;

TEXT* txt_eventlog = {
	
	pos_x = 200;
	strings = 40;
	flags = SHOW;
}


void update_log(STRING* str){
	
/*	int i;
	for(i = 0; i < txt_eventlog.strings - 1; i++){
		
		str_cpy((txt_eventlog.pstring)[i], (txt_eventlog.pstring)[i+1]);
	}
	str_cpy((txt_eventlog.pstring)[txt_eventlog.strings - 1], str);
*/	
	int i;
	for(i = 0; i < txt_eventlog.strings - 1; i++){
		
		(txt_eventlog.pstring)[i] = (txt_eventlog.pstring)[i+1];
	}
	(txt_eventlog.pstring)[txt_eventlog.strings - 1] = str;
}


void main(){
	
	int i;
	for(i = 0; i < txt_eventlog.strings; i++){
//		(txt_eventlog.pstring)[i] = str_create("");
	}
	
	update_log("MAIN");
	
	msg.name = "FRED";
	update_log(msg.name);
}



Last edited by MrGuest; 02/12/10 12:50.