argument type mismatch (argument 2) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: argument type mismatch (argument 2) (
/showthread.php?tid=469381)
argument type mismatch (argument 2) -
Cerealguy - 13.10.2013
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
Re: argument type mismatch (argument 2) -
xVIP3Rx - 13.10.2013
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;
}
Re: argument type mismatch (argument 2) -
Zex Tan - 13.10.2013
Change the
To your own TextdrawID
Respuesta: argument type mismatch (argument 2) -
Cerealguy - 13.10.2013
See it was a simple solution, I feel like an idiot ... Thank you both <3
Respuesta: argument type mismatch (argument 2) -
Cerealguy - 13.10.2013
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