27.01.2015, 14:50
Ребят, где тут ошибка? Минут 15 сижу и не могу понять...
where the error?
where the error?
Код:
gsString[ 0 ] = EOS; format( gsString, 2048, "INSERT INTO `Accounts`(`Key`, `Name`, `IP`, `Password`, `RegisterDate`, `LoggedIn`, `Level`, `Vip`, `rVip`, `LastOn`, \ `Cash`, `Score`, `Kills`, `Deaths`, `Online`, `Rank`, `BestKillings`, `TimesOnServer`," ); format( gsString, 2048, "%s`FavSkin`, `UseSkin`,`Positive`, `Negative`, \ `Clan`, `ClanRank`, `ClanPoints`, `ClanDeaths`, `ClanOnline`, `ClanJoined`, `Kicks`, `Bans`, `Jails`,", gsString ); format( gsString, 2048, "%s`Warns`, `ClearChats`, `ReactionTest`, `MathTest`, `Mutes`, `ARatio`, `Property`, `Jailed`, `JailTime`, `Frozen`, \ `FreezeTime`, `ChatColor`, `RaceScore`, `DriftScore`, `DuelScore`, `vSpawn_X`, `vSpawn_Y`, `vSpawn_Z`, `vSpawn_A`, \ `TopOnline`, `AdminWarns`, `OwnedCarID`, `AllowToken`, `Token`, `VIPTime`, `SavingSts`, `HouseID`, `BankMoney`,`FreeVIP`", gsString ); format( gsString, 2048, "%s VALUES (0, '%s', '%s', '%s', '%d-%d-%d', 1, 0, 0, 0, '%d-%d-%d', \ 20000, 0, 0, 0, '00:00:00', 0, 0, 1, \ 0, 0, 0, 0,", gsString, PlayerName( playerid ), GetPlayerIPEx( playerid ), Buf, liYear, liMonth, liDay, liYear, liMonth, liDay ); format( gsString, 2048, "%s'None', 0, 0, 0, '00:00:00', 'None', 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, '00:00', 0, \ '00:00', '0xFFFFFFFF', 0, 0, 0, 0.00, 0.00, 0.00, 0.00, \ 0, 0, 0, 0, 0, 0, '0,0', 0, 0, 1)", gsString); mysql_function_query( g_Handle, gsString, false, "OnAccountCreated", "i", playerid );
Код:
[18:02:23] [ERROR] CMySQLQuery::Execute[OnAccountCreated(i)] - (error #1064) 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 'VALUES (0, 'tester', '212.8.167.150', 'FBF59A5DC49F8206277D0C57C1E6F0B25D0F71958' at line 1
Код:
SQL_Function OnAccountCreated( playerid ) { PlayerInfo[ playerid ][ AccID ] = mysql_insert_id( g_Handle ); foreach(new i: Player) { format( gsString, 144, "INFO: {FF0000}%s {FFF1AF}Has registred on server, making have {FF0000}%s {FFF1AF}registred players on server!", PlayerName( playerid ), FormatNumber( PlayerInfo[ playerid ][ AccID ] ) ); SendClientMessage( i, COLOR_YELLOW, gsString ); } return ( 1 ); }