Command ERROR [+REP]
#1

pawn Код:
new query[128];
    //--------------------------------------------------------------------------
    if(AccInfo[playerid][LoggedIn] == 1)
    {
        SavePlayerStats(playerid);
        mysql_format(mysql, query, sizeof(query), "UPDATE `Gangs` SET `gKills`=%d, `gDeaths`=%d, `gPoints`=%d, `gRank`=%d, 'gColor'=%d, 'gWeapon1'=%d, 'gWeapon2'=%d,'gWeapon3'=%d,'gWeapon4'=%d, 'gWeapon5'=%d, 'gWeapon6'=%d, 'gposX'=%f, 'gposY'=%f, 'gposZ'=%f, 'gSkinLeader'=%d, 'gSkinMember'=%d WHERE `GangID`=%d",\
        gInfo[playerid][gKills], gInfo[playerid][gDeaths], gInfo[playerid][gPoints], gInfo[playerid][gRank], gInfo[playerid][gColor], gInfo[playerid][gWeapon1], gInfo[playerid][gWeapon2], gInfo[playerid][gWeapon3], gInfo[playerid][gWeapon4], gInfo[playerid][gWeapon5], gInfo[playerid][gWeapon6], gInfo[playerid][gposX], gInfo[playerid][gposY], gInfo[playerid][gposZ], gInfo[playerid][gID]);
        mysql_tquery(mysql, query, "", "");
    }
ERROR :
pawn Код:
error 075: input line too long (after substitutions)
I know what is the problem but idk what to do to repair this
Reply
#2

Sorry for double post but i need help please.
Reply
#3

break the query in parts
save like first 6 values in first query other 6 in second and if more then in 3rd like this..
Reply
#4

@BroZeus : Better solution, far far better solution :

pawn Код:
mysql_format(mysql, query, sizeof(query), "UPDATE `Gangs` SET `gKills`=%d, `gDeaths`=%d, `gPoints`=%d, \
`gRank`=%d, 'gColor'=%d, 'gWeapon1'=%d, 'gWeapon2'=%d,'gWeapon3'=%d,'gWeapon4'=%d, 'gWeapon5'=%d, \
 'gWeapon6'=%d, 'gposX'=%f, 'gposY'=%f, 'gposZ'=%f, 'gSkinLeader'=%d, 'gSkinMember'=%d WHERE \
`GangID`=%d"
,\
        gInfo[playerid][gKills], gInfo[playerid][gDeaths], gInfo[playerid][gPoints], gInfo[playerid][gRank], \
gInfo[playerid][gColor], gInfo[playerid][gWeapon1], gInfo[playerid][gWeapon2], gInfo[playerid][gWeapon3], \
 gInfo[playerid][gWeapon4], gInfo[playerid][gWeapon5], gInfo[playerid][gWeapon6], gInfo[playerid][gposX], \
gInfo[playerid][gposY], gInfo[playerid][gposZ], gInfo[playerid][gID]);
Btw it's highly un-advocated to use mysql_format if you haven't any '%e' inside.
Reply
#5

Same error at this line :
pawn Код:
gInfo[playerid][gKills], gInfo[playerid][gDeaths], gInfo[playerid][gPoints], gInfo[playerid][gRank], \
Reply
#6

Try to replace your compiler (your_server_floder/pawno) by this one : https://github.com/Zeex/pawn/release...wncc-win32.zip

(drag all the files which are in the compiler archive in your compiler folder)

And try to recompile. It should work as a charm.
Reply
#7

S4t3K thank you . Zeus u 2 !
Reply
#8

Also you can use strcat, anyway your problem solved.
Good luck.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)