Again :S
#1

Line is too long

pawn Код:
format(query, sizeof(query), "UPDATE data SET score=%d, money=%d, kills=%d, deaths=%d, registered=%d, loggedin=%d, level=%d, cookies=%d, cakes=%d, biscuits=%d, icecreams=%d, YG=%d, unlimitedb=%d, quickweapon=%d, vgoto=%d, playerfly=%d, TP=%d, YGFunction1=%d, YGFunction2=%d, YGFunction3=%d, YGFunction4=%d, YGFunction5=%d, YGFunction6=%d, Bank=%d, weed=%d, Condoms=%d, inalcatraz=%d, hours=%d, minutes=%d, seconds=%d, x1=%d, y1=%d, z1=%d, interior1=%d, bowner=%d, bowned=%d, vowned=%d, vowner=%d, vowned2=%d, vowner2=%d WHERE user='%s'",
    GetPlayerScore(playerid),
    GetPlayerMoney(playerid),
    PlayerInfo[playerid][Kills],
    PlayerInfo[playerid][Deaths],
    PlayerInfo[playerid][Registered],
    PlayerInfo[playerid][LoggedIn],
    PlayerInfo[playerid][Level],
    PlayerInfo[playerid][Cookies],
    PlayerInfo[playerid][Cakes],
    PlayerInfo[playerid][Biscuits],
    PlayerInfo[playerid][IceCreams],
    PlayerInfo[playerid][Rb],
    PlayerInfo[playerid][Unlimitedb],
    PlayerInfo[playerid][Quickweapon],
    PlayerInfo[playerid][Vgoto],
    PlayerInfo[playerid][PlayerFly],
    PlayerInfo[playerid][TP],
    PlayerInfo[playerid][YGFunction1],
    PlayerInfo[playerid][YGFunction2],
    PlayerInfo[playerid][YGFunction3],
    PlayerInfo[playerid][YGFunction4],
    PlayerInfo[playerid][YGFunction5],
    PlayerInfo[playerid][YGFunction6],
    PlayerInfo[playerid][bank],
    PlayerInfo[playerid][weed],
    PlayerInfo[playerid][condoms],
    PlayerInfo[playerid][inalcatraz],
    h,
    m,
    s,
    floatround(x),
    floatround(y),
    floatround(z),
    interior,
    PlayerInfo[playerid][bowner],
    PlayerInfo[playerid][bowned],
    PlayerInfo[playerid][vowned],
    PlayerInfo[playerid][vowner],
    PlayerInfo[playerid][vowned2],
    PlayerInfo[playerid][vowner2],
    pname);
    mysql_query(query);
please help
Reply
#2

Use /n or strcat. Search strcat in wiki.sa-mp.com
Reply
#3

but idk how to code in that way
Reply
#4

You can also divide the query into 2 smaller parts.
Reply
#5

pawn Код:
new lstring[256];
        strcat(lstring,"FIRST PART OF UR TEXT HERE\n");
        strcat(lstring,"SECOND PART HERE\n");
        strcat(lstring,"THIRD PART\n");
                strcat(lstring,"Fourth PART\n"); // AND SO ON...

        strcat(lstring,"FINAL PART \n\n");// end with 2 (\n\n)
Thats an Example (replace with ur text)
Reply
#6

but how can i add these functions?

pawn Код:
GetPlayerScore(playerid),
    GetPlayerMoney(playerid),
    PlayerInfo[playerid][Kills],
    PlayerInfo[playerid][Deaths],
    PlayerInfo[playerid][Registered],
    PlayerInfo[playerid][LoggedIn],
    PlayerInfo[playerid][Level],
    PlayerInfo[playerid][Cookies],
    PlayerInfo[playerid][Cakes],
    PlayerInfo[playerid][Biscuits],
    PlayerInfo[playerid][IceCreams],
    PlayerInfo[playerid][Rb],
    PlayerInfo[playerid][Unlimitedb],
    PlayerInfo[playerid][Quickweapon],
    PlayerInfo[playerid][Vgoto],
    PlayerInfo[playerid][PlayerFly],
    PlayerInfo[playerid][TP],
    PlayerInfo[playerid][YGFunction1],
    PlayerInfo[playerid][YGFunction2],
    PlayerInfo[playerid][YGFunction3],
    PlayerInfo[playerid][YGFunction4],
    PlayerInfo[playerid][YGFunction5],
    PlayerInfo[playerid][YGFunction6],
    PlayerInfo[playerid][bank],
    PlayerInfo[playerid][weed],
    PlayerInfo[playerid][condoms],
    PlayerInfo[playerid][inalcatraz],
    h,
    m,
    s,
    floatround(x),
    floatround(y),
    floatround(z),
    interior,
    PlayerInfo[playerid][bowner],
    PlayerInfo[playerid][bowned],
    PlayerInfo[playerid][vowned],
    PlayerInfo[playerid][vowner],
    PlayerInfo[playerid][vowned2],
    PlayerInfo[playerid][vowner2],
    pname);
Reply
#7

help...how can i add those functions?
Reply
#8

bump!!
Reply
#9

pawn Код:
new lstring[256];
        strcat(lstring,"kills=%d\n",/*here ur data like if u have kills first then add this*/ PlayerInfo[playerid][Kills],);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)