08.11.2016, 15:47
Hello.
My query gets cut out.
code:
What my mysql log emits:
My query gets cut out.
code:
PHP код:
forward SetLeader(ffID,target,playerid);
public SetLeader(ffID,target,playerid)
{
new string[400];
myStrcpy(Player[target][FactionRank],"New Leader");
new query[400];
Player[target][Leader] = 1;
format(query,sizeof(query),"UPDATE accounts SET FactionRank='New Leader',IsLeader='1' WHERE Username='%s'",Player[target][Faction],Player[target][FactionName],Name(target));
mysql_tquery(connection,query,"");
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
{
if(Player[i][Faction] == ffID)
{
format(string,sizeof(string),"{40FF00}[{BEF781}%s{40FF00}] Administrator {BEF781}%s{40FF00} has set {BEF781}%s{40FF00} as a faction leader.",Player[i][FactionName],RPName(playerid),RPName(target));
SendMessage(i,0xFF00FF,string);
}
}
return 1;
}
Код:
[11:38:29] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE accounts SET FactionRank='New Leader',IsLeader='1' WHERE ", callback: "(null)", format: "(null)"