Input line too long - Mysql
#3

Okay thanks, so

Quote:

UpdatePlayerData(playerid)
{
if (Player[playerid][IsLoggedIn] == false) return 0;

// if the client crashed, it's not possible to get the player's position in OnPlayerDisconnect callback
// so we will use the last saved position (in case of a player who registered and crashed/kicked, the position will be the default spawn point)

new query[700];
mysql_format(dbhandle, query, sizeof query, "UPDATE `players` SET `sexe` = '%d', `ethnie` = '%d', `age` = '%d', `skin` = '%d', `level` = '%d', `adminlevel` = '%d', `banned` = '%d', `faction` = '%d', `cash` = '%d', `rankfaction` = '%d' WHERE `id` = '%d' LIMIT 1",

// %d WHERE `id` = %d LIMIT 1", Player[playerid][Sexe], Player[playerid][Ethnie], Player[playerid][Age], Player[playerid][Skin], Player[playerid][Level], Player[playerid][AdminLevel], Player[playerid][Banned], Player[playerid][Faction], Player[playerid][Cash], Player[playerid][ID]);


Player[playerid][Sexe],
Player[playerid][Ethnie],
Player[playerid][Age],
Player[playerid][Skin],
Player[playerid][Level],
Player[playerid][AdminLevel],
Player[playerid][Banned],
Player[playerid][Faction],
Player[playerid][Cash],
Player[playerid][RankFaction],
);

//mysql_format(dbhandle, query, sizeof query, "UPDATE `players` SET `rankfaction` = %d WHERE `id` = %d LIMIT 1", Player[playerid][RankFaction], Player[playerid][ID]);
// mysql_tquery(dbhandle, query, false, "", "");
mysql_tquery(dbhandle, query);

return 1;
}

Its right?

But

C:\Users\\Desktop\BLANK_SCRIPT\gamemodes\mysql.pwn (1058 -- 1073) : error 029: invalid expression, assumed zero
C:\Users\\Desktop\BLANK_SCRIPT\gamemodes\mysql.pwn (1058 -- 1073) : error 001: expected token: ",", but found ";"



EDIT: Its ok lol, I have forget an comma

Player[playerid][RankFaction],
);


Thanks man
Reply


Messages In This Thread
( FIXED ) Input line too long - Mysql - by Klayton - 04.09.2017, 10:19
Re: Input line too long - Mysql - by JasonRiggs - 04.09.2017, 10:27
Re: Input line too long - Mysql - by Klayton - 04.09.2017, 10:35
Re: Input line too long - Mysql - by JasonRiggs - 04.09.2017, 10:39
Re: Input line too long - Mysql - by Klayton - 04.09.2017, 10:40
Re: Input line too long - Mysql - by JasonRiggs - 04.09.2017, 10:44
Re: Input line too long - Mysql - by Klayton - 04.09.2017, 10:53
Re: Input line too long - Mysql - by JasonRiggs - 04.09.2017, 11:00
Re: Input line too long - Mysql - by 10MIN - 04.09.2017, 11:03
Re: Input line too long - Mysql - by Klayton - 04.09.2017, 11:13
Re: Input line too long - Mysql - by Klayton - 04.09.2017, 11:16

Forum Jump:


Users browsing this thread: 1 Guest(s)