30.04.2011, 20:55
Hello,
I've been working on a Mysql login/register system today. Everything is working except for the SavePlayer stock.
Heres the enum:
Now here's the Stock:
And heres the Server_log.txt
Thanks in advance.
P.S. I have changed the UPDATE to INSERT and still no results....
Oh and I'm using StrickenKids plugin.
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];
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);
}
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) |
P.S. I have changed the UPDATE to INSERT and still no results....
Oh and I'm using StrickenKids plugin.