stock LoginPlayer(playerid,password[]) {newhashedPassword[145 + 1],name[MAX_PLAYER_NAME];GetPlayerName(playerid, name, sizeof(name));WP_Hash( hashedPassword, sizeof hashedPassword, password );format(string, sizeof(string), \"SELECT * FROM Accounts WHERE Name = \'%s\' AND Password = \'%s\'\", name, hashedPassword);mysql_query(string);mysql_store_result(); mysql_fetch_row_format(string);sscanf(string,\"p<|>ddds[24]s[256]dds[24]ldds[256]s[24]ds[256]s[24]ds[256]s[24]ds[256]s[24]ds[256]s[24]dd\", AccVar[playerid][AdminLevel], AccVar[playerid][RegTime], AccVar[playerid][Muted], AccVar[playerid][MutedBy], AccVar[playerid][MuteReason], AccVar[playerid][Jailed], AccVar[playerid][JailTime], AccVar[playerid][JailedBy], AccVar[playerid][JailWrite], AccVar[playerid][LastOnline], AccVar[playerid][Warn1], AccVar[playerid][Warn1_Reason], AccVar[playerid][Warn1_WarnedBy], AccVar[playerid][Warn2], AccVar[playerid][Warn2_Reason], AccVar[playerid][Warn2_WarnedBy], AccVar[playerid][Warn3], AccVar[playerid][Warn3_Reason], AccVar[playerid][Warn3_WarnedBy], AccVar[playerid][Warn4], AccVar[playerid][Warn4_Reason], AccVar[playerid][Warn4_WarnedBy], AccVar[playerid][Warn5], AccVar[playerid][Warn5_Reason], AccVar[playerid][Warn5_WarnedBy], AccVar[playerid][Character1_ID], AccVar[playerid][Character2_ID]);mysql_free_result();}
...gamemodes\\new.pwn(301) : error 075: input line too long (after substitutions)
stock LoadCharacter(playerid, characterid) {newname[MAX_PLAYER_NAME];GetPlayerName(playerid, name, sizeof(name));format(string, sizeof(string), \"SELECT * FROM Characters WHERE Name = \'%s\' AND CharacterID = \'%d\'\",name, characterid);mysql_query(string);mysql_store_result(); mysql_fetch_row_format(string,\"|\");sscanf(string,\"p<|>s[20]dggffffdldds[24]s[256]ddddddddddddddddldll\",CVar[playerid][RegTime],CVar[playerid][Age],CVar[playerid][Health],CVar[playerid][Armour],CVar[playerid][Pos][0],CVar[playerid][Pos][1],CVar[playerid][Pos][2],CVar[playerid][Pos][3],CVar[playerid][Money], CVar[playerid][sex], CVar[playerid][Jailed], CVar[playerid][JailTime], CVar[playerid][JailedBy], CVar[playerid][JailReason], CVar[playerid][interior], CVar[playerid][VirtualWorld], CVar[playerid][Kills], CVar[playerid][Deaths], CVar[playerid][WalkStyle], CVar[playerid][FightStyle], CVar[playerid][Height], CVar[playerid][Weight], CVar[playerid][Origin], CVar[playerid][Language], CVar[playerid][Wanted], CVar[playerid][stamina], CVar[playerid][Muscle], CVar[playerid][Job], CVar[playerid][Co_Job], CVar[playerid][Fatigue], CVar[playerid][Watery], CVar[playerid][skin], CVar[playerid][Mask], CVar[playerid][Helmet]);mysql_free_result();}
Ígyis-úgyis hibát ír...
new CVar[MAX_PLAYERS][34];stock LoadCharacter(playerid, characterid) { new name[MAX_PLAYER_NAME], string[128]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), \"SELECT * FROM Characters WHERE Name = \'%s\' AND CharacterID = \'%d\'\",name, characterid); mysql_query(string); mysql_store_result(); mysql_fetch_row_format(string,\"|\"); sscanf(string,\"p<|>s[20]dggffffdldds[24]s[256]ddddddddddddddddldll\",CVar[playerid][0],CVar[playerid][1],CVar[playerid][2],CVar[playerid][3],CVar[playerid][4],CVar[playerid][5],CVar[playerid][6],CVar[playerid][7],CVar[playerid][8], CVar[playerid][9], CVar[playerid][10], CVar[playerid][11], CVar[playerid][12], CVar[playerid][13], CVar[playerid][14], CVar[playerid][15], CVar[playerid][16], CVar[playerid][17], CVar[playerid][18], CVar[playerid][19], CVar[playerid][20], CVar[playerid][21], CVar[playerid][22], CVar[playerid][23], CVar[playerid][24], CVar[playerid][25], CVar[playerid][26], CVar[playerid][27], CVar[playerid][28], CVar[playerid][29], CVar[playerid][30], CVar[playerid][31], CVar[playerid][32], CVar[playerid][33]); mysql_free_result();}
pawn Code:enum E_DATA{ E_DATE_C, Float:E_DATA_X, E_DATA_NAME[32], E_DATA_Z}main{ new var[E_DATA]; sscanf(\"1 12.0 Bob c\", \"e<ifs[32]c>\", var);} [/quote]Fõleg ha a CVar minden egyes eleme használatban van, ha meg van olyan ami nincs, azt át rakod másba.
mysql_fetch_row_format(string);
És miért nem használod sscanf enumerációs jeleit? pawn Code:enum E_DATA{ E_DATE_C, Float:E_DATA_X, E_DATA_NAME[32], E_DATA_Z}main{ new var[E_DATA]; sscanf(\"1 12.0 Bob c\", \"e<ifs[32]c>\", var);} Fõleg ha a CVar minden egyes eleme használatban van, ha meg van olyan ami nincs, azt át rakod másba. [/quote]Ezt nem teljesen értem...Esetleg valami példát tudnátok mutatni amivel ebben az esetben el tudnék indulni?
pawn Code:enum E_DATA{ E_DATE_C, Float:E_DATA_X, E_DATA_NAME[32], E_DATA_Z}main{ new var[E_DATA]; sscanf(\"1 12.0 Bob c\", \"e<ifs[32]c>\", var);}
Ezt nem teljesen értem...Esetleg valami példát tudnátok mutatni amivel ebben az esetben el tudnék indulni?
#include <a_samp>#include <a_mysql>enumAccVar_Enum{AdminLevel,RegTime[20]};newAccVar[MAX_PLAYERS][AccVar_Enum];stock LoginPlayer(playerid, password[]) {newhashedPassword[145 + 1], name[MAX_PLAYER_NAME];GetPlayerName(playerid, name, sizeof(name));WP_Hash( hashedPassword, sizeof hashedPassword, password );format(string, sizeof(string), \"SELECT * FROM Accounts WHERE Name = \'%s\' AND Password = \'%s\'\", name, hashedPassword);mysql_query(string);mysql_store_result();mysql_fetch_row_format(string);sscanf(string,\"e<p<|>ds[20]>\", AccVar[playerid]);mysql_free_result();}