Problem -
Jimmi - 02.09.2015
Код:
stock SaveExecCMDS(playerid, const string[], &str)
{
new uns[MAX_PLAYER_NAME];
GetPlayerName(playerid, uns, sizeof(uns));
mysql_format(handle,string, sizeof(string), "INSERT INTO `logExecCmds`(`Player`, `Command`, `DateTime`, `ECount`) VALUES ('%s','%s','%s','%d')", uns, string, RegEx(), str);
mysql_tquery(handle,string, "", "");
return 1;
}
stock SaveNewsReporterActivity(playerid, const string[], &str)
{
new uns[MAX_PLAYER_NAME];
GetPlayerName(playerid, uns, sizeof(uns));
mysql_format(handle,string, sizeof(string), "INSERT INTO `NewsReporterActivity`(`Player`, `Command`, `DateTime`, `ECount` , `ZI`) VALUES ('%s','%s','%s','%d', '%s')", uns, string, RegEx(), str, GetWeekDay() );
mysql_tquery(handle,string, "", "");
return 1;
}
PHP код:
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(1861) : error 035: argument type mismatch (argument 2)
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(1861) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(1862) : error 035: argument type mismatch (argument 2)
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(1870) : error 035: argument type mismatch (argument 2)
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(1870) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(1871) : error 035: argument type mismatch (argument 2)
Re: Problem -
Jimmi - 02.09.2015
uppp[pp
Re: Problem -
Yashas - 02.09.2015
Why a reference array?
Just use str instead of &str.
Re: Problem -
Jimmi - 05.09.2015
upp[p[
Re: Problem -
bgedition - 05.09.2015
Which are these lines, explain more, please!
Re: Problem -
Jimmi - 05.09.2015
Hear
mysql_format(handle,string, sizeof(string), "INSERT INTO `NewsReporterActivity`(`Player`, `Command`, `DateTime`, `ECount` , `ZI`) VALUES ('%s','%s','%s','%d', '%s')", uns, string, RegEx(), str, GetWeekDay() );
and
mysql_format(handle,string, sizeof(string), "INSERT INTO `logExecCmds`(`Player`, `Command`, `DateTime`, `ECount`) VALUES ('%s','%s','%s','%d')", uns, string, RegEx(), str);
Re: Problem -
bgedition - 05.09.2015
What is regEx function doing and what is returning - string or number
Re: Problem -
Jimmi - 05.09.2015
stock RegEx()
{
new fx[24],a,b,c,d,e,f;
gettime(a,b,c); getdate(d,e,f);
format(fx, sizeof(fx), "%02d/%02d/%02d - %02d:%02d:%02d", f,e,d,a,b,c);
return fx;
}
Re: Problem -
bgedition - 05.09.2015
This function returns string not an integer so change your sepecifier for it from %d to %s in your error lines.
Read this for more info
https://sampwiki.blast.hk/wiki/Format it is highly recommended. But if don't want don't do it.