Problem
#1

Код:
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 035argument type mismatch (argument 2)
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(1861) : warning 224indeterminate array size in "sizeof" expression (symbol "")
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(1862) : error 035argument type mismatch (argument 2)
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(1870) : error 035argument type mismatch (argument 2)
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(1870) : warning 224indeterminate array size in "sizeof" expression (symbol "")
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(1871) : error 035argument type mismatch (argument 2
Reply
#2

uppp[pp
Reply
#3

Why a reference array?

Just use str instead of &str.
Reply
#4

upp[p[
Reply
#5

Which are these lines, explain more, please!
Reply
#6

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);
Reply
#7

What is regEx function doing and what is returning - string or number
Reply
#8

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;
}
Reply
#9

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)