error 047: array sizes do not match, or destination array is too small
#8

You need to format them, you can use strcat or format.
Код:
#if !defined strcpy // to copy a string
	#define strcpy(%0,%1) \
		strcat((%0[0] = '\0', %0), %1)
#endif

public StoreChatLine(playerid,text[])
{
	for(new i = 0; i < MAX_CHAT_MSGS_STORE-1; i++)
		strcpy(ChatMessages[i], ChatMessages[i+1]);
	format(Jstring,sizeof(Jstring),"%s(ID: %d): %s",GetName(playerid),playerid,text);
	strcpy(ChatMessages[MAX_CHAT_MSGS_STORE-1], Jstring);
}

public StoreReport(playerid,reported,reason[])
{
	new hour,minute,second;
	gettime(hour,minute,second);
	for(new i = 0; i < MAX_REPORTS_STORE-1; i++)
		strcpy(Reports[i], Reports[i+1]);
	format(Jstring,sizeof(Jstring),"%d:%d:%d - %s(ID: %d) Has Reported %s(ID: %d) |{FF0000} REASON: %s ",hour,minute,second,GetName(playerid),playerid,Ge tName(reported),reported,reason);
	strcpy(Reports[MAX_REPORTS_STORE-1], Jstring);
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)