MYSQL - input line too long (after substitutions)
#6

Quote:
Originally Posted by ReshiramZekrom
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/Strins

Try in this way:

pawn Код:
new string[512];

    strins(string,"UPDATE `users` SET `IP`=%s`Admin`=%d,`Money`=%d,`Level`=%d,`Kills`=%d,`Deaths`=%d,`Warns`=%d,`Banned`=%d,`BannedReason`=%s,`BannedBy`=%s,",strlen(string));
    strins(string,"`Beta`=%d,`Faction`=%d,`FactionRank`=%s,`FactionRight`=%d, WHERE `ID`=%d",strlen(string));
    new query[512]; // this is line 664
    format(query, sizeof(query), string, IP[playerid], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pScores], PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pWarns],PlayerInfo[playerid][pBanned],PlayerInfo[playerid][pBanReason],PlayerInfo[playerid][pBannedAdminName],PlayerInfo[playerid][pBeta],PlayerInfo[playerid][pFaction], PlayerInfo[playerid][pFactionRank],PlayerInfo[playerid][pFactionRight], PlayerInfo[playerid][ID]);

    mysql_query(query);
If you use more queries it creates more lag because the server must search the ID of the player twice, but it's not very influent
Seems like this fixed it, but received many other errors, if I can't get those fixed I'll add them to this thread :P

EDIT:
Код:
// (671) : error 035: argument type mismatch (argument 1)
	mysql_query(query);
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)