30.08.2014, 17:08
Код:
E:\Mas Ozii\Coeg\gamemodes\ucp.pwn(207) : error 075: input line too long (after substitutions) E:\Mas Ozii\Coeg\gamemodes\ucp.pwn(208) : error 037: invalid string (possibly non-terminated string) E:\Mas Ozii\Coeg\gamemodes\ucp.pwn(208) : error 017: undefined symbol "INSERT" E:\Mas Ozii\Coeg\gamemodes\ucp.pwn(208) : error 017: undefined symbol "INTO" E:\Mas Ozii\Coeg\gamemodes\ucp.pwn(208) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new hpass[129], query[800];
switch(dialogid)
{
case DIALOG_LOGIN:
{
if(!response) return Kick(playerid);
WP_Hash(hpass, 129, inputtext);
if(!strcmp(hpass, Player[playerid][Pass]))
{
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `players` WHERE `User` = '%e' LIMIT 1", GetUserName(playerid)); // limit result to 1
mysql_tquery(mysql, query, "LoadUser", "i", playerid);
SetTimerEx("OnAccountBanCheck", 1000, false, "i", playerid);
KillTimer(LoginTimer[playerid]);
LoginAttempt[playerid] = 0;
Logged[playerid] = true;
PlayerTextDrawHide(playerid, LoginTD[playerid]);
}
else
{
if(LoginAttempt[playerid] >= 2)
{
SetTimerEx("KickPlayer", 1000, false, "i", playerid);
SendClientMessage(playerid, COLOR_ERROR, "Too many failed login attempts!");
Logged[playerid] = false;
LoginAttempt[playerid] = 0;
}
LoginAttempt[playerid] ++;
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Authenticate", "{FFFFFF}Your account already exists. Please\nauthenticate by typing your password below.\n\nYou have entered a {F05151}incorrect{FFFFFF} password!", "Login", "Quit");
}
}
case DIALOG_REGISTER:
{
if(!response) return Kick(playerid);
if(strlen(inputtext) < 6) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registration", "{FFFFFF}Your account does not exist. Please register below\nbefore playing so your statistics save.\n\nYour password must be at least {F05151}6 characters{FFFFFF} long!", "Next", "Quit");
WP_Hash(Player[playerid][Pass], 129, inputtext); //hashing inputtext
// this line 208 mysql_format(mysql, query, sizeof(query), "INSERT INTO `players` (`ID`, `User`, `Pass`, `IP`, `Admin`, `SkinID`, `AccountLocked`, `AccountBanned`, `BanningAdmin`, `BannedReason`, `MoneyHand`, `MoneyBank`,`Health`, `Armour`, `LastActivity`, `WeaponSlot1`, `WepSlotAmmo1`, `WeaponSlot2`, `WepSlotAmmo2`, `WeaponSlot3`, `WepSlotAmmo3`, `WeaponSlot4`, `WepSlotAmmo4`, `WeaponSlot5`, `WepSlotAmmo5`) VALUES ('', '%e', '%s', '%s', 0, 299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 250, 5000, 0, 0, 0, 100.0, 0.0, 0, 0)", GetUserName(playerid), Player[playerid][Pass], IP[playerid]);
mysql_tquery(mysql, query, "CreateUser", "i", playerid);
Logged[playerid] = true;
Newreg[playerid] = true;
}
}
return false;
}