06.05.2014, 22:33
Hello,
Someone can help me to ensure that this code can work with the BlueG Mysql plugin ?
This is the code:
I start but I get this error: error 035: argument type mismatch (argument 1)
Regards.
Someone can help me to ensure that this code can work with the BlueG Mysql plugin ?
This is the code:
Код:
public MySQLUpdateBuild(query[], sqlplayerid) // by Luk0r
{
new querylen = strlen(query);
//new querymax = sizeof(query);
new querymax = MAX_STRING;
if (querylen < 1) format(query, querymax, "UPDATE players SET ");
else if (querymax-querylen < 50) // make sure we're being safe here
{
// query is too large, send this one and reset
new whereclause[32];
format(whereclause, sizeof(whereclause), " WHERE id=%d", sqlplayerid);
strcat(query, whereclause, querymax);
mysql_query(query); <-- This line
format(query, querymax, "UPDATE players SET ");
}
else if (strfind(query, "=", true) != -1) strcat(query, ",", MAX_STRING);
return 1;
}
Regards.


