argument type mismatch (argument 2)
#1

hi please help me i make /report command :c and error

error 035: argument type mismatch (argument 2)

Код:
public ReportToAdmins(const string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	if(IsPlayerConnected(i) == 1)
	if(pInfo[i][Adminlevel] >= 1 || IsPlayerAdmin(i))
	TextDrawShowForAll(i, Report);
 	TextDrawSetString(Report[i], string);
//	SaveLogs("Reports", string);
	SetTimer("ReportHide", 4000, 1);
	}
	return 1;
}
ln:
Код:
TextDrawSetString(Report[i], string);
Sorry no speak much english
Reply
#2

I think you have to remove the "const" from
pawn Код:
public ReportToAdmins(const string[])
And from the forward too,
More about consts..
So I think it should be like that ?
pawn Код:
new Text:Report[MAX_PLAYERS];
forward ReportToAdmins(string[]);
public ReportToAdmins(string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) == 1)
    if(pInfo[i][Adminlevel] >= 1 || IsPlayerAdmin(i))
    TextDrawShowForPlayer(i, Report[i]);
    TextDrawSetString(Report[i], string);
//  SaveLogs("Reports", string);
    SetTimer("ReportHide", 4000, 1);
    }
    return 1;
}
Reply
#3

Change the
pawn Код:
TextdrawSetString
To your own TextdrawID
Reply
#4

See it was a simple solution, I feel like an idiot ... Thank you both <3
Reply
#5

how could achieve that if I followed Several reports not remove the previous if it is made a new line

Example i use /report Player is hack

Admin show text User reported: Player is hack

text hide in 4sec and before that another user also reported

User reported: Player is hack
User2 reported: Player2 is hack
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)