[19:09:28] [DEBUG] mysql_pquery - connection: 1, query: "INSERT INTO Users (Name,Password, Admin) VALUES ('K1ll3rw0rm2','", callback: "(null)", format: "(null)" [19:09:28] [DEBUG] mysql_pquery - connection: 1, query: "UPDATE Users SET IP = '******' WHERE Name='K1ll3rw0rm2'", callback: "(null)", format: "(null)" [19:09:28] [DEBUG] CMySQLQuery::Execute[] - starting query execution [19:09:28] [DEBUG] CMySQLQuery::Execute[] - starting query execution [19:09:28] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 1.631 milliseconds [19:09:28] [ERROR] CMySQLQuery::Execute[] - (error #1364) Field 'Money' doesn't have a default value [19:09:28] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
Dialog_Register(playerid, response, inputtext[])
{
switch(response)
{
case 1:
{
new escpass[100];
mysql_real_escape_string(inputtext, escpass);
if(AccountExists[playerid])
return SendClientMessage(playerid, 0xFF0000, "[ACCOUNT] You're already registered!");
if(APlayerData[playerid][PlayerLogged] == 1)
return SendClientMessage(playerid, 0xFF0000, "[ACCOUNT] You're already logged in!");
if(strlen(inputtext) < 3 || strlen(inputtext) >= 32)
{
SendClientMessage(playerid, 0xFF0000, "[ACCOUNT] Your password is too short or too long!");
ShowPlayerDialog(playerid, DialogRegister, DIALOG_STYLE_PASSWORD, "Welcome to European Trucking", "Welcome to European Trucking please register in order to play", "Register", "Cancel");
}
CheckMySQL();
new string[500], buf[129];
WP_Hash(buf, 129, escpass);
format(string, sizeof(string), "INSERT INTO Users (Name,Password, Admin) VALUES ('%s','%s', '0')", APlayerData[playerid][Name], buf);
mysql_pquery( Handle, string, "", "" );
AccountExists[playerid] = 1;
SendClientMessage(playerid, 0xFF0000, "[ACCOUNT] Your account has been created, please login now!");
ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_PASSWORD, "Welcome to European Trucking", "Welcome to European Trucking please login in order to play", "Login", "Cancel");
new string1[128], IP[16], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerIp(playerid, IP, sizeof(IP));
format(string1, sizeof(string1), "UPDATE Users SET IP = '%s' WHERE Name='%s'", IP, pName);
mysql_pquery( Handle, string1, "", "" );
SendClientMessage(playerid, 0xFF0000, "You have been given 5.000$ starter money");
GivePlayerCash(playerid, 5000);
SavePlayer(playerid);
}
case 0:
{
Kick(playerid);
}
}
return 1;
}
[20:08:12] [DEBUG] mysql_pquery - connection: 1, query: "INSERT INTO Users (Name, Password) VALUES ('K1ll3rw0rm2', '292CB", callback: "(null)", format: "(null)"
(error #1364) Field 'Money' doesn't have a default value |
Dialog_Register(playerid, response, inputtext[])
{
switch(response)
{
case 1:
{
new escpass[100];
mysql_real_escape_string(inputtext, escpass);
print (escpass);
if(AccountExists[playerid])
return SendClientMessage(playerid, 0xFF0000, "[ACCOUNT] You're already registered!");
if(APlayerData[playerid][PlayerLogged] == 1)
return SendClientMessage(playerid, 0xFF0000, "[ACCOUNT] You're already logged in!");
if(strlen(inputtext) < 3 || strlen(inputtext) >= 32)
{
SendClientMessage(playerid, 0xFF0000, "[ACCOUNT] Your password is too short or too long!");
ShowPlayerDialog(playerid, DialogRegister, DIALOG_STYLE_PASSWORD, "Welcome to European Trucking", "Welcome to European Trucking please register in order to play", "Register", "Cancel");
}
CheckMySQL();
new string2[500], buf[129];
WP_Hash(buf, 129, escpass);
format(string2, 500, "INSERT INTO Users (Name, Password, Admin, Money, Score, Fines, Muted, ECoins, MLevel, IP, LastIP, Houses, Club, PJobs, TJobs, CJobs, CoJob, PFed, JJObs, Kmdriven, signature) VALUES ('%s', '%s', 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ' ')", APlayerData[playerid][Name], buf);
mysql_pquery( Handle, string2, "", "" );
print(string2);
AccountExists[playerid] = 1;
SendClientMessage(playerid, 0xFF0000, "[ACCOUNT] Your account has been created, please login now!");
ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_PASSWORD, "Welcome to European Trucking", "Welcome to European Trucking please login in order to play", "Login", "Cancel");
new string1[128], IP[16], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerIp(playerid, IP, sizeof(IP));
format(string1, sizeof(string1), "UPDATE Users SET IP = '%s' WHERE Name='%s'", IP, pName);
mysql_pquery( Handle, string1, "", "" );
SendClientMessage(playerid, 0xFF0000, "You have been given 5.000$ starter money");
GivePlayerCash(playerid, 5000);
SavePlayer(playerid);
}
case 0:
{
Kick(playerid);
}
}
return 1;
}