![](https://www.sa-mp.ro/uploads/set_resources_42/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
Razerz
-
Posts
19 -
Joined
-
Last visited
Content Type
Profiles
Forums
News
Documentation
Posts posted by Razerz
-
-
Up, am scos ce am aduagat si acu am ajuns iara la eroarea "CMySQLResult::GetRowDataByName()",1,"invalid row index('0)",('0');". Cand apare aceasta eroare se pierd Cashu/Scoru si coinsii uneori..
-
Up, stie cineva?
-
Salut SA-MP.RO !
Problema intalnita: De ceva timp primesc mai multe erori in Mysql Log carora nu le dau de cap.
Eroarea/Warning-ul: Log : http://pastebin.com/BfwDzXHp
Acestea sunt doar 2 erori.
Log("12:25:16","CMySQLQuery::Execute[()]",1,"(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 's Casino' WHERE `Key` = 1' at line 1",1);
Log("09:55:00","CMySQLQuery::Execute[()]",1,"(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 'm not in DANGER ,',`Description2` = 'I'm the DANGER !',`Description3` = '',`Posi' at line 1",1);
Imagini/Video:
Inainte sa primesc aceste erori, primeam urmatoarea eroare CMySQLResult::GetRowDataByName()",1,"invalid row index('0)",('0'); de la callback-ul CheckAccountPassword. Am adaugat in acest CallBack acest cod
new Rows, Fields; cache_get_data(Rows, Fields); if (Rows == 0) return 0;
Dup adaugarea acestui cod, eroarea CMySQLResult::GetRowDataByName()",1,"invalid row index('0)",('0'); a disparut dar, au aparut cele de mai sus.
Sa imi ziceti ce mai este nevoie sa postez,
Multumesc Mult.
-
O sa revin cu edit daca mai apare eroarea ( sa nu dati TC la topic )
-
Nu am inteles, mai exact trebuie sa iti dau tabelu unde sunt cont-urile creeate? sau astea
//--------------------------- Account INSERT ---------------------// 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`, `KillingSpree`, `Drugs`, `TimesOnServer`," ); format( gsString, 2048, "%s`Coins`, `SAdmin`, `FavSkin`, `UseSkin`, `Description1`, `Description2`, `Description3`, `Positive`, `Negative`, \ `Clan`, `ClanRank`, `E-Mail`, `ClanPoints`, `ClanDeaths`, `ClanOnline`, `ClanJoined`, `Kicks`, `Bans`, `Jails`,", gsString ); format( gsString, 2048, "%s`Warns`, `ClearChats`, `ReactionTest`, `MathTest`, `Mutes`, `ARatio`, `Property`, `Jailed`, `JailTime`, `Frozen`, \ `FreezeTime`, `RAdmin`, `ChatColor`, `RaceScore`, `StuntScore`, `DriftScore`, `DuelScore`, `CNRScore`, `vSpawn_X`, `vSpawn_Y`, `vSpawn_Z`, `vSpawn_A`, \ `TopOnline`, `AdminWarns`, `OwnedCarID`, `SavingSts`, `HouseID`, `BankMoney`,", gsString ); format( gsString, 2048, "%s`Lang`, `GangID`,`GangKills`,`GangDeaths`,`GangRank`,`GangWarns`,`GangCaptures`,`GangPoints`, `NoPM`, `NoGoto`, `NoSpec`)", gsString ); format( gsString, 2048, "%s VALUES (0, '%s', '%s', '%s', '%d-%d-%d', 1, 0, 0, 0, '%d-%d-%d', \ 500000, 50, 0, 0, '00:00:00', 0, 0, 0, 0, 1, \ 0, 0, 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', 0, '0xFFFFFFFF', 0, 0, 0, 0, 0, 0.00, 0.00, 0.00, 0.00, \ 0, 0, 0, '0,0', 0, 0, %d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", gsString, Lang[ playerid ] ); mysql_function_query( g_Handle, gsString, false, "OnAccountCreated", "i", playerid );
SavePlayer( playerid ) { new Ratio[ 7 ], h, m, s, c_h, c_m, c_s, szYear, szMonth, szDay; Ratio[ 0 ] = PlayerInfo[ playerid ][ PKicks ] + PlayerInfo[ playerid ][ PBans ]; Ratio[ 1 ] = Ratio[ 0 ] + PlayerInfo[ playerid ][ PWarns ]; Ratio[ 2 ] = Ratio[ 1 ] + PlayerInfo[ playerid ][ PJails ]; Ratio[ 3 ] = Ratio[ 2 ] + PlayerInfo[ playerid ][ PClearCH ]; Ratio[ 4 ] = Ratio[ 3 ] + PlayerInfo[ playerid ][ PReactions ]; Ratio[ 5 ] = Ratio[ 4 ] + PlayerInfo[ playerid ][ PMaths ]; Ratio[ 6 ] = Ratio[ 5 ] + PlayerInfo[ playerid ][ PMutes ]; TotalGameTime( playerid, h, m, s ); TotalClanTime( playerid, c_h, c_m, c_s ); getdate( szYear, szMonth, szDay ); gsString[ 0 ] = EOS; format( gsString, 3048, "UPDATE `Accounts` SET `LoggedIn` = 0,`Level` = %d,`Vip` = %d,`rVip` = %d,`LastOn` = '%d-%d-%d',`Cash` = %d", PlayerInfo[ playerid ][ Level ], PlayerInfo[ playerid ][ pVip ], PlayerInfo[ playerid ][ rVip ], szYear, szMonth, szDay, GetPlayerMoney( playerid ) ); format( gsString, 3048, "%s,`Score` = %d,`Kills` = %d,`Deaths` = %d,`Online` = '%02d:%02d:%02d',`Rank` = '%s',`BestKillings` = '%d'", gsString, GetPlayerScore( playerid ), PlayerInfo[ playerid ][ Kills ], PlayerInfo[ playerid ][ Deaths ], h, m, s, PlayerInfo[ playerid ][ RankName ], PlayerInfo[ playerid ][ bKillingSpree ] ); format( gsString, 3048, "%s,`KillingSpree` = '%d',`Drugs` = '%d',`TimesOnServer` = `TimesOnServer`+1,`Coins` = '%d',`SAdmin` = '%d'", gsString, PlayerInfo[ playerid ][ KillingSpree ], PlayerInfo[ playerid ][ Drugs ], PlayerInfo[ playerid ][ Coins ], PlayerInfo[ playerid ][ SAdmin ] ); format( gsString, 3048, "%s,`FavSkin` = '%d',`UseSkin` = '%d',`Description1` = '%s',`Description2` = '%s',`Description3` = '%s',`Positive` = '%d',`Negative` = '%d'", gsString, PlayerInfo[ playerid ][ FavSkin ], PlayerInfo[ playerid ][ UseSkin ], PlayerInfo[ playerid ][ Description1 ], PlayerInfo[ playerid ][ Description2 ], PlayerInfo[ playerid ][ Description3 ], PlayerInfo[ playerid ][ PosRespect ], PlayerInfo[ playerid ][ NegRespect ] ); format( gsString, 3048, "%s,`Clan` = '%s',`ClanRank` = '%d',`ClanPoints` = %d,`ClanDeaths` = %d,`ClanOnline` = '%02d:%02d:%02d',`ClanJoined` = '%s'", gsString, PlayerInfo[ playerid ][ Clan ], PlayerInfo[ playerid ][ rank ], PlayerInfo[ playerid ][ c_points ], PlayerInfo[ playerid ][ c_deaths ], c_h, c_m, c_s, PlayerInfo[ playerid ][ JoinedInClan ] ); format( gsString, 3048, "%s,`Kicks` = '%d',`Bans` = '%d',`Jails` = '%d',`Warns` = '%d',`ClearChats` = '%d',`ReactionTest` = '%d',`MathTest` = '%d'", gsString, PlayerInfo[ playerid ][ PKicks ], PlayerInfo[ playerid ][ PBans ], PlayerInfo[ playerid ][ PJails ], PlayerInfo[ playerid ][ PWarns ], PlayerInfo[ playerid ][ PClearCH ], PlayerInfo[ playerid ][ PReactions ], PlayerInfo[ playerid ][ PMaths ] ); format( gsString, 3048, "%s,`Mutes` = '%d',`ARatio` = '%d',`Property` = '%d',`Jailed` = '%d',`JailTime` = '%d:%d',`Frozen` = %d,`FreezeTime` = '%d:%d'", gsString, PlayerInfo[ playerid ][ PMutes ], Ratio[ 6 ], PlayerInfo[ playerid ][ Property ], PlayerInfo[ playerid ][ Jailed ], gTime[ playerid ][ 0 ], gTime[ playerid ][ 1 ], PlayerInfo[ playerid ][ Frozen ], gTime[ playerid ][ 0 ], gTime[ playerid ][ 1 ] ); format( gsString, 3048, "%s,`RAdmin` = '%d', `ChatColor` = %d, `RaceScore` = '%d', `StuntScore` = '%d', `CNRScore` = %d", gsString, PlayerInfo[ playerid ][ rAdmin ], PlayerInfo[ playerid ][ p_TextColor ], PlayerInfo[ playerid ][ Race_Score ], PlayerInfo[ playerid ][ Stunt_Score ], PlayerInfo[ playerid ][ CNR_Score ] ); format( gsString, 3048, "%s,`DriftScore` = '%d',`DuelScore` = '%d',`vSpawn_X` = %.2f, `vSpawn_Y` = %.2f, `vSpawn_Z` = %.2f, `vSpawn_A` = %.2d", gsString, PlayerInfo[ playerid ][ Drift_Score ], PlayerInfo[ playerid ][ D_Score ], GetPVarFloat( playerid, "vSpawn_X" ), GetPVarFloat( playerid, "vSpawn_Y" ), GetPVarFloat( playerid, "vSpawn_Z" ), GetPVarFloat( playerid, "vSpawn_A" ) ); format( gsString, 3048, "%s,`TopOnline` = %02d%02d%02d,`OwnedCarID` = %d,`AdminWarns` = %d,`SavingSts` = '%d,%d',`HouseID` = %d", gsString, PlayerInfo[ playerid ][ hours ], PlayerInfo[ playerid ][ mins ], PlayerInfo[ playerid ][ secs ], PlayerInfo[ playerid ][ CarID ], PlayerInfo[ playerid ][ AdminWarns ], PlayerInfo[ playerid ][ p_HoldSaving ], PlayerInfo[ playerid ][ p_VehicleHoldSaving ], PlayerInfo[ playerid ][ szOwnedHouseID ] ); format( gsString, 3048, "%s,`BankMoney` = %d,`Lang` = %d,`NoPM` = %d,`NoGoto` = %d,`NoSpec` = %d", gsString, PlayerInfo[ playerid ][ P_BANK_MONEY ], Lang[ playerid ], PlayerInfo[ playerid ][ NoPM ], PlayerInfo[ playerid ][ GotoIgnored ], PlayerInfo[ playerid ][ Ignore_Spec ] ); format( gsString, 3048, "%s,`GangID` = %d,`GangRank` = %d,`GangKills` = %d,`GangDeaths` = %d,`GangWarns` = %d,`GangCaptures` = %d,`GangPoints` = %d WHERE `Key` = %d", gsString, Users[ playerid ][ gang ], Users[ playerid ][ isLeader ], Users[ playerid ][ g_Kills ], Users[ playerid ][ g_Deaths ], Users[ playerid ][ g_Warns ], Users[ playerid ][ g_Captures ], Users[ playerid ][ g_Points ], PlayerInfo[ playerid ][ AccID ] ); mysql_function_query( g_Handle, gsString, false, "", "" ); ...continuare....
-
Asta trebuia postata la ajutor scripting, pe aici nu prea se activeaza asa mult.
Poti sa pui codul de la CheckAccountPassword daca mai ai nevoie de ajutor?
SQL_Function CheckAccountPassword( playerid, password[ ] ) { if ( !IsPlayerConnected( playerid ) ) return ( 1 ); new Login_Field[ 256 ], xxstring[512]; cache_get_field_content( 0, "Password", Login_Field, g_Handle ); if ( strmatch( password, Login_Field ) ) { new LastOnline[ 256 ], RegisterDate[ 256 ]; PlayerPlaySound(playerid,1057,0.0,0.0,0.0); format( gsQuery, 128, "UPDATE `Accounts` SET `LoggedIn` = 1,`IP` = '%s',`Lang` = %d WHERE `Name` = '%s'", GetPlayerIPEx( playerid ), Lang[ playerid ], PlayerName( playerid ) ); mysql_function_query( g_Handle, gsQuery, false, "", "" ); //----------------------------- Loggin' Into Account -----------------// PlayerInfo[ playerid ][ LoggedIn ] = 1; PlayerInfo[ playerid ][ AccID ] = cache_get_field_content_int( 0, "Key", g_Handle ); PlayerInfo[ playerid ][ pVip ] = cache_get_field_content_int( 0, "Vip", g_Handle ); PlayerInfo[ playerid ][ Level ] = cache_get_field_content_int( 0, "Level", g_Handle ); PlayerInfo[ playerid ][ rVip ] = cache_get_field_content_int( 0, "rVip", g_Handle ); PlayerInfo[ playerid ][ bKillingSpree ] = cache_get_field_content_int( 0, "BestKillings", g_Handle ); PlayerInfo[ playerid ][ KillingSpree ] = cache_get_field_content_int( 0, "KillingSpree", g_Handle ); PlayerInfo[ playerid ][ Drugs ] = cache_get_field_content_int( 0, "Drugs", g_Handle ); PlayerInfo[ playerid ][ Coins ] = cache_get_field_content_int( 0, "Coins", g_Handle ); PlayerInfo[ playerid ][ PosRespect ] = cache_get_field_content_int( 0, "Positive", g_Handle ); PlayerInfo[ playerid ][ NegRespect ] = cache_get_field_content_int( 0, "Negative", g_Handle ); PlayerInfo[ playerid ][ SAdmin ] = cache_get_field_content_int( 0, "SAdmin", g_Handle ); PlayerInfo[ playerid ][ FavSkin ] = cache_get_field_content_int( 0, "FavSkin", g_Handle ); PlayerInfo[ playerid ][ rank ] = cache_get_field_content_int( 0, "ClanRank", g_Handle ); PlayerInfo[ playerid ][ c_points ] = cache_get_field_content_int( 0, "ClanPoints", g_Handle ); PlayerInfo[ playerid ][ c_deaths ] = cache_get_field_content_int( 0, "ClanDeaths", g_Handle ); PlayerInfo[ playerid ][ PKicks ] = cache_get_field_content_int( 0, "Kicks", g_Handle ); PlayerInfo[ playerid ][ PBans ] = cache_get_field_content_int( 0, "Bans", g_Handle ); PlayerInfo[ playerid ][ PJails ] = cache_get_field_content_int( 0, "Jails", g_Handle ); PlayerInfo[ playerid ][ PWarns ] = cache_get_field_content_int( 0, "Warns", g_Handle ); PlayerInfo[ playerid ][ PClearCH ] = cache_get_field_content_int( 0, "ClearChats", g_Handle ); PlayerInfo[ playerid ][ PReactions ] = cache_get_field_content_int( 0, "ReactionTest", g_Handle ); PlayerInfo[ playerid ][ PMaths ] = cache_get_field_content_int( 0, "MathTest", g_Handle ); PlayerInfo[ playerid ][ PMutes ] = cache_get_field_content_int( 0, "Mutes", g_Handle ); PlayerInfo[ playerid ][ Property ] = cache_get_field_content_int( 0, "Property", g_Handle ); PlayerInfo[ playerid ][ Jailed ] = cache_get_field_content_int( 0, "Jailed", g_Handle ); PlayerInfo[ playerid ][ Frozen ] = cache_get_field_content_int( 0, "Frozen", g_Handle ); PlayerInfo[ playerid ][ Kills ] = cache_get_field_content_int( 0, "Kills", g_Handle ); PlayerInfo[ playerid ][ Deaths ] = cache_get_field_content_int( 0, "Deaths", g_Handle ); PlayerInfo[ playerid ][ rAdmin ] = cache_get_field_content_int( 0, "RAdmin", g_Handle ); PlayerInfo[ playerid ][ p_TextColor ] = cache_get_field_content_int( 0, "ChatColor", g_Handle ); PlayerInfo[ playerid ][ D_Score ] = cache_get_field_content_int( 0, "DuelScore", g_Handle ); PlayerInfo[ playerid ][ Race_Score ] = cache_get_field_content_int( 0, "RaceScore", g_Handle ); PlayerInfo[ playerid ][ Stunt_Score ] = cache_get_field_content_int( 0, "StuntScore", g_Handle ); PlayerInfo[ playerid ][ Drift_Score ] = cache_get_field_content_int( 0, "DriftScore", g_Handle ); PlayerInfo[ playerid ][ CarID ] = cache_get_field_content_int( 0, "OwnedCarID", g_Handle ); PlayerInfo[ playerid ][ szOwnedHouseID ] = cache_get_field_content_int( 0, "HouseID", g_Handle ); PlayerInfo[ playerid ][ P_BANK_MONEY ] = cache_get_field_content_int( 0, "BankMoney", g_Handle ); Lang[ playerid ] = cache_get_field_content_int( 0, "Lang", g_Handle ); Users[ playerid ][ gang ] = cache_get_field_content_int( 0, "GangID", g_Handle ); Users[ playerid ][ g_Kills ] = cache_get_field_content_int( 0, "GangKills", g_Handle ); Users[ playerid ][ g_Deaths ] = cache_get_field_content_int( 0, "GangDeaths", g_Handle ); Users[ playerid ][ isLeader ] = cache_get_field_content_int( 0, "GangRank", g_Handle ); Users[ playerid ][ g_Warns ] = cache_get_field_content_int( 0, "GangWarns", g_Handle ); Users[ playerid ][ g_Captures ] = cache_get_field_content_int( 0, "GangCaptures", g_Handle ); Users[ playerid ][ g_Points ] = cache_get_field_content_int( 0, "GangPoints", g_Handle ); PlayerInfo[ playerid ][ NoPM ] = cache_get_field_content_int( 0, "NoPM", g_Handle ); PlayerInfo[ playerid ][ GotoIgnored ] = cache_get_field_content_int( 0, "NoGoto", g_Handle ); PlayerInfo[ playerid ][ Ignore_Spec ] = cache_get_field_content_int( 0, "NoSpec", g_Handle ); cache_get_field_content( 0, "E-Mail", Login_Field, g_Handle ); format( PlayerInfo[ playerid ][ EMail ], 128, "%s", Login_Field ); SetPVarFloat( playerid, "vSpawn_X", cache_get_field_content_float( 0, "vSpawn_X", g_Handle ) ); SetPVarFloat( playerid, "vSpawn_Y", cache_get_field_content_float( 0, "vSpawn_Y", g_Handle ) ); SetPVarFloat( playerid, "vSpawn_Z", cache_get_field_content_float( 0, "vSpawn_Z", g_Handle ) ); SetPVarFloat( playerid, "vSpawn_A", cache_get_field_content_float( 0, "vSpawn_A", g_Handle ) ); ResetPlayerMoney( playerid ); GivePlayerMoney( playerid, cache_get_field_content_int( 0, "Cash", g_Handle ) ); SetPVarInt( playerid, "sMoney", cache_get_field_content_int( 0, "Cash", g_Handle ) ); SetPlayerScore( playerid, cache_get_field_content_int( 0, "Score", g_Handle ) ); cache_get_field_content( 0, "Online", Login_Field, g_Handle ); sscanf( Login_Field, "p<:>iii", PlayerInfo[ playerid ][ hours ], PlayerInfo[ playerid ][ mins ], PlayerInfo[ playerid ][ secs ] ); cache_get_field_content( 0, "LastOn", LastOnline, g_Handle ); cache_get_field_content( 0, "RegisterDate", RegisterDate, g_Handle ); cache_get_field_content( 0, "Rank", Login_Field, g_Handle ); format( PlayerInfo[ playerid ][ RankName ], 25, Login_Field ); cache_get_field_content( 0, "Description1", Login_Field, g_Handle ); format( PlayerInfo[ playerid ][ Description1 ], 128, "%s", Login_Field ); cache_get_field_content( 0, "Description2", Login_Field, g_Handle ); format( PlayerInfo[ playerid ][ Description2 ], 128, "%s", Login_Field ); cache_get_field_content( 0, "Description3", Login_Field, g_Handle ); format( PlayerInfo[ playerid ][ Description3 ], 128, "%s", Login_Field ); cache_get_field_content( 0, "ClanJoined", Login_Field, g_Handle ); format( PlayerInfo[ playerid ][ JoinedInClan ], 50, Login_Field ); cache_get_field_content( 0, "Clan", Login_Field, g_Handle ); format( PlayerInfo[ playerid ][ Clan ], 25, "%s", Login_Field ); cache_get_field_content( 0, "ClanOnline", Login_Field ); sscanf( Login_Field, "p<:>iii", PlayerInfo[ playerid ][ clan_H ], PlayerInfo[ playerid ][ clan_M ], PlayerInfo[ playerid ][ clan_S ] ); cache_get_field_content( 0, "SavingSts", Login_Field, g_Handle ); sscanf( Login_Field, "p<,>ii", PlayerInfo[ playerid ][ p_HoldSaving ], PlayerInfo[ playerid ][ p_VehicleHoldSaving ] ); if ( PlayerInfo[ playerid ][ Jailed ] >= 1 ) { cache_get_field_content( 0, "JailTime", Login_Field, g_Handle ); sscanf( Login_Field, "p<:>ii", gTime[ playerid ][ 0 ], gTime[ playerid ][ 1 ] ); } if ( PlayerInfo[ playerid ][ Frozen ] == 1 ) { cache_get_field_content( 0, "FreezeTime", Login_Field, g_Handle ); sscanf( Login_Field, "p<:>ii", gTime[ playerid ][ 0 ], gTime[ playerid ][ 1 ] ); } if ( PlayerInfo[ playerid ][ CarID ] != 0 ) { format( gsQuery, 128, "SELECT * FROM `PersonalVehicles` WHERE `Owner` = '%s'", PlayerName( playerid ) ); mysql_function_query( g_Handle, gsQuery, true, "LoadPersonalVehicleInfo", "i", playerid ); } if ( !strmatch( PlayerInfo[ playerid ][ Clan ], "None" ) ) { format( gsQuery, 256, "SELECT * FROM `Clans` WHERE `name` = '%s'", PlayerInfo[ playerid ][ Clan ] ); mysql_function_query( g_Handle, gsQuery, true, "LoadClanDetails", "i", playerid ); } { switch( Lang[ playerid ] ) { case 0: { format(xxstring, 512, "{1DEE01}Hi {FF0000}%s\n\ {1DEE01}You have been LoggedIn:\n\n\ {FF0000}• {1DEE01}Admin Level: {00BBF6}%d\n\ {FF0000}• {1DEE01}VIP Level: {00BBF6}%d\n\ {FF0000}• {1DEE01}Stats Note: {00BBF6}%d/10\n\n\ {1DEE01}Use {FF0000}/Stats{1DEE01} for more details!", PlayerName(playerid), PlayerInfo[playerid][Level], PlayerInfo[playerid][pVip], GiveNote(playerid)); return ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "{0066CC}X{FFFF00}X{FF0000}X{AFAFAF} - Account Info", xxstring, "Ok",""); } case 1: { format(xxstring, 512, "{1DEE01}Salut {FF0000}%s\n\ {1DEE01}Ai fost logat cu succes:\n\n\ {FF0000}• {1DEE01}Admin Level: {00BBF6}%d\n\ {FF0000}• {1DEE01}VIP Level: {00BBF6}%d\n\ {FF0000}• {1DEE01}Stats Note: {00BBF6}%d/10\n\n\ {1DEE01}Foloseste {FF0000}/Stats{1DEE01} pentru mai multe detalii!", PlayerName(playerid), PlayerInfo[playerid][Level], PlayerInfo[playerid][pVip], GiveNote(playerid)); return ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "{0066CC}X{FFFF00}X{FF0000}X{AFAFAF} - Account Info", xxstring, "Ok",""); } } } } else { PlayerInfo[ playerid ][ FailLogin ]++; if ( PlayerInfo[ playerid ][ FailLogin ] == MAX_FAIL_LOGINS ) { format( gsString, 144, "*** {00FF00}%s(%d) {FFF1AF}has been kicked. Reason: {FF0000}Failed Logins{FFF1AF}!", PlayerName( playerid ), playerid ); SendClientMessageToAll( COLOR_GREY, gsString ); Kick( playerid ); } switch( Lang[ playerid ] ) { case 0: format( gsString, 256, "\t\t\t{FF0000}ACCOUNT:\n\n{ACACAC}Login failed! Incorrect Password.\nATTEMPTS: {FF0000}%d/%d\n\n{00FF00}PONT: {ACACAC}Change your '{FF0000}Name{ACACAC}' if this isn't your account name.", PlayerInfo[ playerid ][ FailLogin ], MAX_FAIL_LOGINS ); case 1: format( gsString, 256, "\t\t\t\t{FF0000}CONT:\n\n{ACACAC}Logarea nu a reusit! Parola Incorecta.\nINCERCARI: {FF0000}%d/%d\n\n{00FF00}PONT: {ACACAC}Schimbati '{FF0000}Numele{ACACAC}' daca acesta nu este numele accountului tau.", PlayerInfo[ playerid ][ FailLogin ], MAX_FAIL_LOGINS ); } ShowPlayerDialog( playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FFFFFF}Login your account", gsString, "Login", "New Name" ); } return ( 1 ); }
Poti pune o poza cu tabela din mysql ?
http://s30.postimg.org/uahnl0oo1/tab1.png
http://s9.postimg.org/4uxrho7z3/tab2.png
-- -- Table structure for table `Accounts` -- CREATE TABLE IF NOT EXISTS `Accounts` ( `Key` int(11) NOT NULL AUTO_INCREMENT, `Name` text, `IP` text, `Password` text, `RegisterDate` date DEFAULT NULL, `LoggedIn` int(11) DEFAULT NULL, `Level` int(11) DEFAULT NULL, `Vip` int(11) DEFAULT NULL, `rVip` int(11) DEFAULT NULL, `LastOn` date DEFAULT NULL, `Cash` int(11) DEFAULT NULL, `Score` int(11) DEFAULT NULL, `Kills` int(11) DEFAULT NULL, `Deaths` int(11) DEFAULT NULL, `Online` text, `Rank` text NOT NULL, `BestKillings` int(11) DEFAULT NULL, `KillingSpree` int(11) DEFAULT NULL, `Drugs` int(11) DEFAULT NULL, `TimesOnServer` int(11) DEFAULT NULL, `Coins` int(11) DEFAULT NULL, `SAdmin` int(11) DEFAULT NULL, `FavSkin` int(11) DEFAULT NULL, `UseSkin` int(11) DEFAULT NULL, `Description1` text NOT NULL, `Description2` text NOT NULL, `Description3` text NOT NULL, `Positive` int(11) DEFAULT NULL, `Negative` int(11) DEFAULT NULL, `Clan` text, `ClanRank` int(11) DEFAULT NULL, `E-Mail` text, `ClanPoints` int(11) DEFAULT NULL, `ClanDeaths` int(11) DEFAULT NULL, `ClanOnline` text, `ClanJoined` text, `Kicks` int(11) DEFAULT NULL, `Bans` int(11) DEFAULT NULL, `Jails` int(11) DEFAULT NULL, `Warns` int(11) DEFAULT NULL, `ClearChats` int(11) DEFAULT NULL, `ReactionTest` int(11) DEFAULT NULL, `MathTest` int(11) DEFAULT NULL, `Mutes` int(11) DEFAULT NULL, `ARatio` int(11) DEFAULT NULL, `Property` int(11) DEFAULT NULL, `Jailed` int(11) DEFAULT NULL, `JailTime` text, `Frozen` int(11) DEFAULT NULL, `FreezeTime` text, `RAdmin` int(11) DEFAULT NULL, `ChatColor` int(11) NOT NULL, `RaceScore` int(11) DEFAULT NULL, `StuntScore` int(11) DEFAULT NULL, `DriftScore` int(11) DEFAULT NULL, `DuelScore` int(11) DEFAULT NULL, `CNRScore` int(11) DEFAULT NULL, `vSpawn_X` float NOT NULL, `vSpawn_Y` float NOT NULL, `vSpawn_Z` float NOT NULL, `vSpawn_A` float NOT NULL, `TopOnline` int(11) NOT NULL, `AdminWarns` int(11) NOT NULL, `OwnedCarID` int(11) NOT NULL, `SavingSts` text NOT NULL, `HouseID` int(11) NOT NULL, `BankMoney` int(11) NOT NULL, `Lang` int(11) NOT NULL, `GangID` int(11) NOT NULL, `GangRank` int(11) NOT NULL, `GangKills` int(11) NOT NULL, `GangDeaths` int(11) NOT NULL, `GangWarns` int(11) NOT NULL, `GangCaptures` int(11) NOT NULL, `GangPoints` int(11) NOT NULL, `NoPM` int(11) DEFAULT NULL, `NoGoto` int(11) DEFAULT NULL, `NoSpec` int(11) DEFAULT NULL, PRIMARY KEY (`Key`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=12959 ;
-
Up, ma poate ajuta cineva?
-
Up, nu stie nimeni?
-
Salut SA-MP.RO !
Problema intalnita : De ceva timp a aparut o problema, mai exact uneori se pierd banii/ scor-ul si vip-ul.
Eroarea/Warning-ul : in mysql log primesc eroarea CMySQLResult::GetRowDataByName()",1,"invalid row index('0)",('0');"de la CallBack-ul CheckAccountPassword(nu stiu daca asta este problema) aici aveti mysql log http://pastebin.com/7tiaKbtJ si aici callback-ul checkaccountpassword http://pastebin.com/DvzpyiZh
Imagini/video : imagine cu eroarea
Ai incercat sa o rezolvi singur: ? Da, dar nu am reusit.
Multumesc mult.
-
Nu functioneaza, am marit stringu si l-am tot marit.. ( initial era de 1024 ).
-
Up, chiar nu ma poate ajuta nimeni ? ( scuzati-mi insistentele dar ma enerveaza foarte tare aceasta problema )
-
Up, nu stie nimeni?
-
Am observat alta problema, cand dau de exemplu /warn id reason a textul apare dar, daca dau /warn id reason limbaju textu nu mai apare.. Am incercat sa maresc string-ul de la reason, crezand ca poate de acolo este problema dar tot asa face..
-
Am marit string-ul si degeaba :
normal trebuia sa fie asa
-
Salutare Sa-Mp.Ro,
Problema intalnita (descriere): De ceva timp am o problema minora dar in acelasi timp foarte enervanta. De cateva saptamani, uneori cand folosesc comanda /warn sau /ban nu apare text-ul. La ban uneori se afiseaza doar :
======================(Ban Info)======================
Reason: X====================================================Normal trebuia sa fie======================(Ban Info)======================Player X has been Banned by Administrator X for X days.Reason: X====================================================si la warn nu se afiseaza textul respectiv:*** Administrator x has given x a warning. (Reason: x ) (Warning: x/3)***"Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu):CMD:ban( playerid, params[ ] ) { LevelCheck( playerid, 5 ); new liPlayer, liDays, lsReason[ 56 ] ; if ( sscanf( params, "uis[56]", liPlayer, liDays, lsReason ) ) return SendClientMessage( playerid, COLOR_ULTRARED, "USAGE: {33CCFF}/ban [PlayerID] [Day(s)] [Reason]" ); if ( !IsPlayerConnected( liPlayer ) ) return SendError( playerid, "Player not connected !" ); if ( PlayerInfo[ liPlayer ][ Level ] >= 5 ) FormatMSG( liPlayer, COLOR_ULTRARED, "%s has tried to ban you!", PlayerName( playerid ) ); if ( PlayerInfo[ liPlayer ][ Level ] > PlayerInfo[ playerid ][ Level ] ) return SendError( playerid, "You cannot use this command on this admin" ); if ( liPlayer == playerid && !IsPlayerAdmin( playerid ) ) return SendError( playerid, "You can't ban yourself!" ); if ( liDays < 1 || liDays > 99 ) return SendError( playerid, "Invalid day ! Write values between 1 and 99." ); PlayerInfo[ playerid ][ PBans ]++; SendClientMessageToAll( COLOR_ABLUE, "======================(Ban Info)======================" ); format( gsString, 200, "{AFAFAF}Player {3399ff}%s {AFAFAF}has been {FF0000}Banned{AFAFAF} by Administrator {3399ff}%s {AFAFAF}for {FF0000}%d {AFAFAF}days.", PlayerName( liPlayer ), PlayerName( playerid ), liDays, zDate( ) ); SendClientMessageToAll( COLOR_ABLUE, gsString ); format( gsString, 200, "{AFAFAF}Reason: {3399ff}%s ", lsReason ); SendClientMessageToAll( COLOR_ABLUE, gsString ); SendClientMessageToAll( COLOR_ABLUE, "====================================================" ); new szDay, szMonth, szYear, szHour, szMinute, szSecond ; getdate( szYear, szMonth, szDay ); gettime( szHour, szMinute, szSecond ); if ( !IsPlayerAdmin( liPlayer ) ) { format( gsQuery, 1024, "INSERT INTO `Banlist` (`Key`,`IP`,`Name`,`Reason`,`Admin`,`BanDate`,`BanTime`,`BanDays`,`Request`,`Aproove`) VALUES(0,'%s','%s','%s','%s','%d-%d-%d','%d:%d:%d',UNIX_TIMESTAMP() + %d * 86400,0,0)", GetPlayerIPEx( liPlayer ), PlayerName( liPlayer ), lsReason, PlayerName( playerid ), szYear, szMonth, szDay, szHour, szMinute, szSecond, liDays ); mysql_function_query( g_Handle, gsQuery, false, "", "" ); } for ( new i = 0; i < 69; i++ ) SendClientMessage( liPlayer, ~1, " " ); switch( Lang[ liPlayer ] ) { case 0: { format( gsString, 500, "{00FF00}You are banned your server by {FF0000}%s {00FF00}for {FF0000}%d {00FF00}days!", PlayerName( playerid ), liDays ); SendClientMessage(liPlayer, COLOR_GREEN, gsString ); format( gsString, 500, "{FFFF00}Reason: %s", lsReason ); SendClientMessage(liPlayer, COLOR_GREEN, gsString ); SendClientMessage(liPlayer, COLOR_GREEN, "{00FF00}Press F8 for Screen!" ); format( gsString, 500, "{00FF00}If you un-ban, visit x forum and make a request to the name {FF0000}%s {00FF00}and ip {FF0000}%s {00FF00}!", PlayerName( liPlayer ), GetPlayerIPEx( liPlayer ) ); SendClientMessage(liPlayer, COLOR_GREEN, gsString ); } case 1: { format( gsString, 500, "{00FF00}Ai primit interdictie pe server de la {FF0000}%s {00FF00}pentru {FF0000}%d {00FF00}zile!", PlayerName( playerid ), liDays ); SendClientMessage(liPlayer, COLOR_GREEN, gsString ); format( gsString, 500, "{FFFF00}Motiv: %s", lsReason ); SendClientMessage(liPlayer, COLOR_GREEN, gsString ); SendClientMessage(liPlayer, COLOR_GREEN, "{00FF00}Apasa F8 pentru a face o poza!" ); format( gsString, 500, "{00FF00}Daca vrei un-ban, viziteaza x forum si fa o cerere cu numele {FF0000}%s {00FF00}si ip-ul {FF0000}%s {00FF00}!", PlayerName( liPlayer ), GetPlayerIPEx( liPlayer ) ); SendClientMessage(liPlayer, COLOR_GREEN, gsString ); } } FormatLog( "BanCMD_Log", "Administrator %s has banned %s for reason: '%s'", PlayerName( playerid ), PlayerName( liPlayer ), lsReason ); SetTimerEx("KickPlayer", 500,false,"i",liPlayer); return ( 1 ); }
CMD:warn( playerid, params[ ] ) { LevelCheck( playerid, 3 ); new Player, Reason[ 80 ] ; if ( sscanf( params, "us[80]", Player, Reason ) ) return SendClientMessage( playerid, COLOR_ULTRARED, "USAGE: {33CCFF}/warn [PlayerID] [Reason]" ); if ( !IsPlayerConnected( Player ) ) return SendError( playerid, "Player is not connected" ); if ( PlayerInfo[ Player ][ Level ] > PlayerInfo[ playerid ][ Level ] ) return SendError( playerid, "You cannot use this command on this admin" ); if ( Player == playerid ) return SendError( playerid, "You cannot warn yourself" ); PlayerInfo[ playerid ][ PWarns ]++; PlayerInfo[ Player ][ Warnings ]++; if ( PlayerInfo[ Player ][ Warnings ] == MAX_WARNINGS ) { gsString[ 0 ] = EOS; if ( PlayerInfo[ playerid ][ Level ] >= 3 ) format( gsString, sizeof( gsString ), "{D1D1D1}*** Administrator {FF0000}%s{D1D1D1} has kicked {00A6FF}%s. {D1D1D1}(Reason: %s) (Warning: %d/%d)***", PlayerName( playerid ), PlayerName( Player ), Reason, PlayerInfo[ Player ][ Warnings ], MAX_WARNINGS ); SendClientMessageToAll( COLOR_GREY, gsString ); Kick( Player ); PlayerInfo[ Player ][ Warnings ] = 0; return ( 1 ); } else { if ( PlayerInfo[ playerid ][ Level ] >= 3 ) format( gsString, sizeof( gsString ), "{FFFF00}*** Administrator {FF0000}%s{FFFF00} has given {00BBF6}%s {FFFF00}a warning. {FFFF00}(Reason: %s) (Warning: %d/%d) ***", PlayerName( playerid ), PlayerName( Player ), Reason, PlayerInfo[ Player ][ Warnings ], MAX_WARNINGS ); SendClientMessageToAll( COLOR_YELLOW, gsString ); Announce( Player, "~r~~h~You have received a ~y~~h~warning!", 2500, 1 ); } FormatLog( "Warn_Log", "Administrator %s has warned %s with reason %s", PlayerName( playerid ), PlayerName( Player ), Reason ); return ( 1 ); }
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Am incercat cateva metode dar nu i-am dat de cap.Multumesc mult.
-
Ok, va rog sa dati TC la topic.
-
Up, nu stie nimeni?
-
Salut Sa-mp.ro, de ceva timp am o problema minora dar in acelasi timp deranjanta.De cateva saptamani, uneori cand folosesc comanda /warn sau /ban nu apare text-ul.
La warn nu apare cand dai warn, textul fiind:
*** Administrator x has given x a warning. (Reason: x ) (Warning: x/3)***"
si la ban
======================(Ban Info)======================Player X has been Banned by Administrator X for X days.Reason: X====================================================Uneori la ban se afiseaza doar======================(Ban Info)======================Reason: X====================================================Aici aveti cele 2 comenzi :CMD:ban( playerid, params[ ] ) { LevelCheck( playerid, 5 ); new liPlayer, liDays, lsReason[ 56 ] ; if ( sscanf( params, "uis[56]", liPlayer, liDays, lsReason ) ) return SendClientMessage( playerid, COLOR_ULTRARED, "USAGE: {33CCFF}/ban [PlayerID] [Day(s)] [Reason]" ); if ( !IsPlayerConnected( liPlayer ) ) return SendError( playerid, "Player not connected !" ); if ( PlayerInfo[ liPlayer ][ Level ] >= 5 ) FormatMSG( liPlayer, COLOR_ULTRARED, "%s has tried to ban you!", PlayerName( playerid ) ); if ( PlayerInfo[ liPlayer ][ Level ] > PlayerInfo[ playerid ][ Level ] ) return SendError( playerid, "You cannot use this command on this admin" ); if ( liPlayer == playerid && !IsPlayerAdmin( playerid ) ) return SendError( playerid, "You can't ban yourself!" ); if ( liDays < 1 || liDays > 99 ) return SendError( playerid, "Invalid day ! Write values between 1 and 99." ); PlayerInfo[ playerid ][ PBans ]++; SendClientMessageToAll( COLOR_ABLUE, "======================(Ban Info)======================" ); format( gsString, 200, "{AFAFAF}Player {3399ff}%s {AFAFAF}has been {FF0000}Banned{AFAFAF} by Administrator {3399ff}%s {AFAFAF}for {FF0000}%d {AFAFAF}days.", PlayerName( liPlayer ), PlayerName( playerid ), liDays, zDate( ) ); SendClientMessageToAll( COLOR_ABLUE, gsString ); format( gsString, 200, "{AFAFAF}Reason: {3399ff}%s ", lsReason ); SendClientMessageToAll( COLOR_ABLUE, gsString ); SendClientMessageToAll( COLOR_ABLUE, "====================================================" ); new szDay, szMonth, szYear, szHour, szMinute, szSecond ; getdate( szYear, szMonth, szDay ); gettime( szHour, szMinute, szSecond ); if ( !IsPlayerAdmin( liPlayer ) ) { format( gsQuery, 1024, "INSERT INTO `Banlist` (`Key`,`IP`,`Name`,`Reason`,`Admin`,`BanDate`,`BanTime`,`BanDays`,`Request`,`Aproove`) VALUES(0,'%s','%s','%s','%s','%d-%d-%d','%d:%d:%d',UNIX_TIMESTAMP() + %d * 86400,0,0)", GetPlayerIPEx( liPlayer ), PlayerName( liPlayer ), lsReason, PlayerName( playerid ), szYear, szMonth, szDay, szHour, szMinute, szSecond, liDays ); mysql_function_query( g_Handle, gsQuery, false, "", "" ); } for ( new i = 0; i < 69; i++ ) SendClientMessage( liPlayer, ~1, " " ); switch( Lang[ liPlayer ] ) { case 0: { format( gsString, 500, "{00FF00}You are banned your server by {FF0000}%s {00FF00}for {FF0000}%d {00FF00}days!", PlayerName( playerid ), liDays ); SendClientMessage(liPlayer, COLOR_GREEN, gsString ); format( gsString, 500, "{FFFF00}Reason: %s", lsReason ); SendClientMessage(liPlayer, COLOR_GREEN, gsString ); SendClientMessage(liPlayer, COLOR_GREEN, "{00FF00}Press F8 for Screen!" ); format( gsString, 500, "{00FF00}If you un-ban, visit x forum and make a request to the name {FF0000}%s {00FF00}and ip {FF0000}%s {00FF00}!", PlayerName( liPlayer ), GetPlayerIPEx( liPlayer ) ); SendClientMessage(liPlayer, COLOR_GREEN, gsString ); } case 1: { format( gsString, 500, "{00FF00}Ai primit interdictie pe server de la {FF0000}%s {00FF00}pentru {FF0000}%d {00FF00}zile!", PlayerName( playerid ), liDays ); SendClientMessage(liPlayer, COLOR_GREEN, gsString ); format( gsString, 500, "{FFFF00}Motiv: %s", lsReason ); SendClientMessage(liPlayer, COLOR_GREEN, gsString ); SendClientMessage(liPlayer, COLOR_GREEN, "{00FF00}Apasa F8 pentru a face o poza!" ); format( gsString, 500, "{00FF00}Daca vrei un-ban, viziteaza x forum si fa o cerere cu numele {FF0000}%s {00FF00}si ip-ul {FF0000}%s {00FF00}!", PlayerName( liPlayer ), GetPlayerIPEx( liPlayer ) ); SendClientMessage(liPlayer, COLOR_GREEN, gsString ); } } FormatLog( "BanCMD_Log", "Administrator %s has banned %s for reason: '%s'", PlayerName( playerid ), PlayerName( liPlayer ), lsReason ); SetTimerEx("KickPlayer", 500,false,"i",liPlayer); return ( 1 ); }
CMD:warn( playerid, params[ ] ) { LevelCheck( playerid, 3 ); new Player, Reason[ 80 ] ; if ( sscanf( params, "us[80]", Player, Reason ) ) return SendClientMessage( playerid, COLOR_ULTRARED, "USAGE: {33CCFF}/warn [PlayerID] [Reason]" ); if ( !IsPlayerConnected( Player ) ) return SendError( playerid, "Player is not connected" ); if ( PlayerInfo[ Player ][ Level ] > PlayerInfo[ playerid ][ Level ] ) return SendError( playerid, "You cannot use this command on this admin" ); if ( Player == playerid ) return SendError( playerid, "You cannot warn yourself" ); PlayerInfo[ playerid ][ PWarns ]++; PlayerInfo[ Player ][ Warnings ]++; if ( PlayerInfo[ Player ][ Warnings ] == MAX_WARNINGS ) { gsString[ 0 ] = EOS; if ( PlayerInfo[ playerid ][ Level ] >= 3 ) format( gsString, sizeof( gsString ), "{D1D1D1}*** Administrator {FF0000}%s{D1D1D1} has kicked {00A6FF}%s. {D1D1D1}(Reason: %s) (Warning: %d/%d)***", PlayerName( playerid ), PlayerName( Player ), Reason, PlayerInfo[ Player ][ Warnings ], MAX_WARNINGS ); SendClientMessageToAll( COLOR_GREY, gsString ); Kick( Player ); PlayerInfo[ Player ][ Warnings ] = 0; return ( 1 ); } else { if ( PlayerInfo[ playerid ][ Level ] >= 3 ) format( gsString, sizeof( gsString ), "{FFFF00}*** Administrator {FF0000}%s{FFFF00} has given {00BBF6}%s {FFFF00}a warning. {FFFF00}(Reason: %s) (Warning: %d/%d) ***", PlayerName( playerid ), PlayerName( Player ), Reason, PlayerInfo[ Player ][ Warnings ], MAX_WARNINGS ); SendClientMessageToAll( COLOR_YELLOW, gsString ); Announce( Player, "~r~~h~You have received a ~y~~h~warning!", 2500, 1 ); } FormatLog( "Warn_Log", "Administrator %s has warned %s with reason %s", PlayerName( playerid ), PlayerName( Player ), Reason ); return ( 1 ); }
Multumesc mult.
Eroare Mysql [Log]
in Suport Servere
Posted
UP