Mysql SavePlayer(playerid) error!
#1

Hello,
I've been working on a Mysql login/register system today. Everything is working except for the SavePlayer stock.

Heres the enum:

pawn Код:
enum pInfo
{
    Username[25],
    Password[50],
    PlayerIP[19],
    Score[9]
}

new PlayerInfo[MAX_PLAYERS][pInfo];
Now here's the Stock:

pawn Код:
stock SaveUser(playerid)
{
    new Query[400]; format(Query, sizeof(Query), "UPDATE `names` (Username, Password, PlayerIP, Score) VALUES('%s', '%s', '%s', 's')", GetName(playerid), PlayerInfo[playerid][Password], GetIp(playerid), PlayerInfo[playerid][Score]);
    mysql_query(Query);
    print(Query);
}
And heres the Server_log.txt

Quote:

[12:55:35] [MySQL] Error (0): Failed to exeute query. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(Username, Password, PlayerIP, Score) VALUES('Georgelopez1', '', '255.255.255.25' at line 1.
[12:55:35] UPDATE `names` (Username, Password, PlayerIP, Score) VALUES('Georgelopez1', '', '255.255.255.255', 's')
[12:55:35] [part] Georgelopez1 has left the server (0:1)

Thanks in advance.

P.S. I have changed the UPDATE to INSERT and still no results....

Oh and I'm using StrickenKids plugin.
Reply


Messages In This Thread
Mysql SavePlayer(playerid) error! - by Georgelopez1 - 30.04.2011, 20:55
Re: Mysql SavePlayer(playerid) error! - by [L3th4l] - 30.04.2011, 21:38
Re: Mysql SavePlayer(playerid) error! - by Georgelopez1 - 30.04.2011, 21:59
Re: Mysql SavePlayer(playerid) error! - by Retardedwolf - 30.04.2011, 22:06
Re: Mysql SavePlayer(playerid) error! - by Zh3r0 - 30.04.2011, 22:11
Re: Mysql SavePlayer(playerid) error! - by Georgelopez1 - 30.04.2011, 23:55
Re: Mysql SavePlayer(playerid) error! - by Georgelopez1 - 01.05.2011, 17:01
Re: Mysql SavePlayer(playerid) error! - by Calgon - 01.05.2011, 17:25
Re: Mysql SavePlayer(playerid) error! - by Kyle - 01.05.2011, 17:27

Forum Jump:


Users browsing this thread: 1 Guest(s)