MYSQL R41-2 [Save And Load Problem ]
#1

This is a new topic!
MYSQL-R41-2


Errors:
-> No Insert all data!!! And no load data.
-> It looks for ip [ Change pID] No IP... ] example: WHERE NAME, AND ID. NO WHERE NAME AND IP, sorry

-> It's just clearer. [ New Theme ]!!! Sorry. Added logg stb

Log


MYSQL LOG

Код:
16:35:12] [WARNING] mysql_connect: no password specified
[16:35:12] [INFO] changed log level from 'warning, error' to 'debug, info, warning, error'
[16:36:01] [DEBUG] mysql_query(1, "SELECT * FROM players WHERE IP = '213.163.36.106'", 1)
[16:36:01] [DEBUG] CHandle::Execute(this=0x664b60, type=3, query=0x693ca0)
[16:36:01] [DEBUG] CConnection::Execute(query=0x693ca0, this=0x6678a0, connection=0x667278)
[16:36:01] [DEBUG] CQuery::Execute(this=0x693ca0, connection=0x667278)
[16:36:01] [INFO] query "SELECT * FROM players WHERE IP = '213.163.36.106'" successfully executed within 0.541 milliseconds
[16:36:01] [DEBUG] CResultSet::Create(connection=0x667278, query_str='SELECT * FROM players WHERE IP = '213.163.36.106'')
[16:36:01] [DEBUG] created new resultset '0x652988'
[16:36:01] [DEBUG] fetched MySQL result '0x694d28'
[16:36:01] [DEBUG] allocated 308 bytes for PAWN result
[16:36:01] [DEBUG] CHandle::Execute - return value: true
[16:36:01] [DEBUG] mysql_query: return value: '1'
[16:36:01] [DEBUG] cache_get_row_count(0x03AB1478)
[16:36:01] [DEBUG] cache_get_row_count: return value: '1'
[16:36:05] [DEBUG] mysql_escape_string(" SELECT * FROM players WHERE Name = 'Test_Character' AND IP = '213.163.36.106'", 0x03AB1214, 128, 1)
[16:36:05] [DEBUG] CHandle::EscapeString(this=0x664b60, src=' SELECT * FROM players WHERE Name = 'Test_Character' AND IP = '213.163.36.106'')
[16:36:05] [DEBUG] CConnection::EscapeString(src=' SELECT * FROM players WHERE Name = 'Test_Character' AND IP = '213.163.36.106'', this=0x6678a0, connection=0x667278)
[16:36:05] [DEBUG] CHandle::EscapeString - return value: true, escaped string: ' SELECT * FROM players WHERE Name = \'Test_Character\' AND IP = \'213.163.36.106\''
[16:36:05] [DEBUG] mysql_escape_string: return value: '84'
[16:36:05] [DEBUG] mysql_query(1, " SELECT * FROM players WHERE Name = 'Test_Character' AND IP = '213.163.36.106'", 1)
[16:36:05] [DEBUG] CHandle::Execute(this=0x664b60, type=3, query=0x693c48)
[16:36:05] [DEBUG] CConnection::Execute(query=0x693c48, this=0x6678a0, connection=0x667278)
[16:36:05] [DEBUG] CQuery::Execute(this=0x693c48, connection=0x667278)
[16:36:05] [INFO] query " SELECT * FROM players WHERE Name = 'Test_Character' AND IP = '213.163.36.106'" successfully executed within 0.535 milliseconds
[16:36:05] [DEBUG] CResultSet::Create(connection=0x667278, query_str=' SELECT * FROM players WHERE Name = 'Test_Character' AND IP = '213.163.36.106'')
[16:36:05] [DEBUG] created new resultset '0x652950'
[16:36:05] [DEBUG] fetched MySQL result '0x665678'
[16:36:05] [DEBUG] allocated 308 bytes for PAWN result
[16:36:05] [DEBUG] CHandle::Execute - return value: true
[16:36:05] [DEBUG] mysql_query: return value: '2'
[16:36:05] [DEBUG] cache_get_row_count(0x03AB1204)
[16:36:06] [DEBUG] cache_get_row_count: return value: '1'
[16:36:08] [DEBUG] mysql_escape_string("SELECT * FROM players WHERE Name = 'Test_Character' AND Password = MD5('asdasd')", 0x03AB1214, 128, 1)
[16:36:08] [DEBUG] CHandle::EscapeString(this=0x664b60, src='SELECT * FROM players WHERE Name = 'Test_Character' AND Password = MD5('asdasd')')
[16:36:08] [DEBUG] CConnection::EscapeString(src='SELECT * FROM players WHERE Name = 'Test_Character' AND Password = MD5('asdasd')', this=0x6678a0, connection=0x667278)
[16:36:08] [DEBUG] CHandle::EscapeString - return value: true, escaped string: 'SELECT * FROM players WHERE Name = \'Test_Character\' AND Password = MD5(\'asdasd\')'
[16:36:08] [DEBUG] mysql_escape_string: return value: '91'
[16:36:08] [DEBUG] mysql_query(1, "SELECT * FROM players WHERE Name = 'Test_Character' AND Password = MD5('asdasd')", 1)
[16:36:08] [DEBUG] CHandle::Execute(this=0x664b60, type=3, query=0x693c48)
[16:36:08] [DEBUG] CConnection::Execute(query=0x693c48, this=0x6678a0, connection=0x667278)
[16:36:08] [DEBUG] CQuery::Execute(this=0x693c48, connection=0x667278)
[16:36:08] [INFO] query "SELECT * FROM players WHERE Name = 'Test_Character' AND Password = MD5('asdasd')" successfully executed within 0.455 milliseconds
[16:36:08] [DEBUG] CResultSet::Create(connection=0x667278, query_str='SELECT * FROM players WHERE Name = 'Test_Character' AND Password = MD5('asdasd')')
[16:36:08] [DEBUG] created new resultset '0x6529c0'
[16:36:08] [DEBUG] fetched MySQL result '0x665678'
[16:36:08] [DEBUG] allocated 308 bytes for PAWN result
[16:36:08] [DEBUG] CHandle::Execute - return value: true
[16:36:08] [DEBUG] mysql_query: return value: '3'
[16:36:08] [DEBUG] cache_get_row_count(0x03AB1204)
[16:36:08] [DEBUG] cache_get_row_count: return value: '1'
[16:36:09] [DEBUG] mysql_format(1, 0x0368D050, 2048, "SELECT * FROM `players` WHERE `Name` = '%e' LIMIT 1")
[16:36:09] [DEBUG] CHandle::EscapeString(this=0x664b60, src='Test_Character')
[16:36:09] [DEBUG] CConnection::EscapeString(src='Test_Character', this=0x6678a0, connection=0x667278)
[16:36:09] [DEBUG] CHandle::EscapeString - return value: true, escaped string: 'Test_Character'
[16:36:09] [DEBUG] mysql_format: return value: '65'
[16:36:09] [DEBUG] mysql_tquery(1, "SELECT * FROM `players` WHERE `Name` = 'Test_Character' LIMIT 1", "KarakterBetoltes", "i")
[16:36:09] [DEBUG] CCallback::Create(amx=0x5ab250, name='KarakterBetoltes', format='i', params=0x3ab11fc, param_offset=5)
[16:36:09] [DEBUG] CCallback::Create - callback index for 'KarakterBetoltes': 3
[16:36:09] [DEBUG] processing specifier 'i' with parameter index 0
[16:36:09] [DEBUG] retrieved and pushed value '0'
[16:36:09] [INFO] Callback 'KarakterBetoltes' set up for delayed execution.
[16:36:09] [DEBUG] created delayed callback with 1 parameter
[16:36:09] [DEBUG] CHandle::Execute(this=0x664b60, type=1, query=0x665620)
[16:36:09] [DEBUG] CConnection::Execute(query=0x665620, this=0x2550020, connection=0x66d638)
[16:36:09] [DEBUG] CQuery::Execute(this=0x665620, connection=0x66d638)
[16:36:09] [DEBUG] CHandle::Execute - return value: true
[16:36:09] [INFO] query "SELECT * FROM `players` WHERE `Name` = 'Test_Character' LIMIT 1" successfully executed within 0.619 milliseconds
[16:36:09] [DEBUG] CResultSet::Create(connection=0x66d638, query_str='SELECT * FROM `players` WHERE `Name` = 'Test_Character' LIMIT 1')
[16:36:09] [DEBUG] created new resultset '0x69a4a8'
[16:36:09] [DEBUG] fetched MySQL result '0x69ac50'
[16:36:09] [DEBUG] allocated 308 bytes for PAWN result
[16:36:09] [DEBUG] mysql_tquery: return value: '1'
[16:36:10] [DEBUG] cache_get_value_name(0, "LogDate", 0x03AB1114, 64)
[16:36:10] [DEBUG] cache_get_value_name: assigned value: '2017.09.03 - 16:32:50'
[16:36:10] [DEBUG] cache_get_value_name: return value: '1'
[16:36:10] [DEBUG] CCallback::Execute(amx=0x5ab250, index=3, num_params=1)
[16:36:10] [INFO] Executing callback 'KarakterBetoltes' with 1 parameter...
[16:36:10] [DEBUG] processing internal specifier 'c'
[16:36:10] [DEBUG] pushed value '0' onto AMX stack
[16:36:10] [DEBUG] executing AMX callback with index '3'
[16:36:10] [DEBUG] cache_get_value_name_float(0, "PosX", 0x03696254)
[16:36:10] [DEBUG] cache_get_value_name_float: assigned value: '1753.3'
[16:36:10] [DEBUG] cache_get_value_name_float: return value: '1'
[16:36:10] [DEBUG] cache_get_value_name_float(0, "PosY", 0x03696258)
[16:36:10] [DEBUG] cache_get_value_name_float: assigned value: '-1894.09'
[16:36:10] [DEBUG] cache_get_value_name_float: return value: '1'
[16:36:10] [DEBUG] cache_get_value_name_float(0, "PosZ", 0x0369625C)
[16:36:10] [DEBUG] cache_get_value_name_float: assigned value: '13.5572'
[16:36:10] [DEBUG] cache_get_value_name_float: return value: '1'
[16:36:10] [DEBUG] cache_get_value_name_float(0, "JatekosHP", 0x0369627C)
[16:36:11] [DEBUG] cache_get_value_name_float: assigned value: '0'
[16:36:11] [DEBUG] cache_get_value_name_float: return value: '1'
[16:36:11] [DEBUG] cache_get_value_name_int(0, "JatekosWorld", 0x03696288)
[16:36:11] [DEBUG] cache_get_value_name_int: assigned value: '0'
[16:36:11] [DEBUG] cache_get_value_name_int: return value: '1'
[16:36:11] [DEBUG] cache_get_value_name_float(0, "JatekosPancel", 0x03696280)
[16:36:11] [DEBUG] cache_get_value_name_float: assigned value: '0'
[16:36:11] [DEBUG] cache_get_value_name_float: return value: '1'
[16:36:11] [DEBUG] cache_get_value_name_float(0, "JatekosAngle", 0x03696284)
[16:36:11] [DEBUG] cache_get_value_name_float: assigned value: '266.828'
[16:36:11] [DEBUG] cache_get_value_name_float: return value: '1'
[16:36:11] [DEBUG] cache_get_value_name_int(0, "JatekosPancel", 0x0369624C)
[16:36:11] [DEBUG] cache_get_value_name_int: assigned value: '0'
[16:36:11] [DEBUG] cache_get_value_name_int: return value: '1'
[16:36:11] [DEBUG] cache_get_value_name_int(0, "JatekosSzint", 0x03696250)
[16:36:11] [DEBUG] cache_get_value_name_int: assigned value: '1'
[16:36:11] [DEBUG] cache_get_value_name_int: return value: '1'
[16:36:11] [DEBUG] cache_get_value_name_int(0, "Admin", 0x03696248)
[16:36:11] [DEBUG] cache_get_value_name_int: assigned value: '0'
[16:36:11] [DEBUG] cache_get_value_name_int: return value: '1'
[16:36:11] [DEBUG] cache_get_value_name_int(0, "JatekosOra", 0x0369626C)
[16:36:11] [DEBUG] cache_get_value_name_int: assigned value: '0'
[16:36:11] [DEBUG] cache_get_value_name_int: return value: '1'
[16:36:11] [DEBUG] cache_get_value_name_int(0, "JatekosPerc", 0x03696270)
[16:36:12] [DEBUG] cache_get_value_name_int: assigned value: '0'
[16:36:12] [DEBUG] cache_get_value_name_int: return value: '1'
[16:36:12] [DEBUG] cache_get_value_name_int(0, "JatekosMPerc", 0x03696274)
[16:36:12] [DEBUG] cache_get_value_name_int: assigned value: '0'
[16:36:12] [DEBUG] cache_get_value_name_int: return value: '1'
[16:36:12] [DEBUG] cache_get_value_name_int(0, "JatekosOles", 0x03696264)
[16:36:12] [DEBUG] cache_get_value_name_int: assigned value: '0'
[16:36:12] [DEBUG] cache_get_value_name_int: return value: '1'
[16:36:12] [DEBUG] cache_get_value_name_int(0, "JatekosInti", 0x03696260)
[16:36:12] [DEBUG] cache_get_value_name_int: assigned value: '0'
[16:36:12] [DEBUG] cache_get_value_name_int: return value: '1'
[16:36:12] [DEBUG] cache_get_value_name_int(0, "JatekosHalal", 0x03696268)
[16:36:12] [DEBUG] cache_get_value_name_int: assigned value: '0'
[16:36:12] [DEBUG] cache_get_value_name_int: return value: '1'
[16:36:12] [DEBUG] cache_get_value_name_int(0, "JatekosSkin", 0x03696278)
[16:36:12] [DEBUG] cache_get_value_name_int: assigned value: '26'
[16:36:12] [DEBUG] cache_get_value_name_int: return value: '1'
[16:36:12] [DEBUG] AMX callback executed with error '0'
[16:36:12] [INFO] Callback successfully executed.
[16:36:29] [DEBUG] cache_get_value_name(0, "RegDate", 0x03AB134C, 64)
[16:36:29] [ERROR] cache_get_value_name: no active cache
SCRIPT CODE

Код:
public OnPlayerRequestClass(playerid, classid)
{
	//mysql_format(SQL, query, sizeof(query),"SELECT * FROM `banns` WHERE `Name` = '%s' LIMIT 1", pName(playerid));
	//mysql_tquery(SQL, query, "BanCheck", "i", playerid);
	SetPlayerToConnect(playerid);
	return 1;
}
Код:
public OnPlayerDisconnect(playerid, reason)
{
	if(!OnlineCheck(playerid)) return ResetPlayerVariables(playerid,0);
	new reasons[3][32] = {"Freeze/Crash","Exit","Kick/Ban"};
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(!OnlineCheck(i)) continue;
		if(GetPlayerALevel(i) <= 0) continue;
		MSGF(i,""COL_GREY"[ID:%d] %s left the server (Reason: %s)",playerid,pName(playerid,true),reasons[reason]);
	}
	KillTimer(oratimer[playerid]);
	Delete3DTextLabel(injuredlabel[playerid]);
    Fell[playerid] = 0;
	SavePlayer(playerid);
	return 1;
}
Код:
public OnPlayerSpawn(playerid)
{
	levanspawnolva[playerid] = 1;
	SetPlayerSkin(playerid, pInfo[playerid][pJatekosSkin]);
	SetPlayerHealth(playerid, pInfo[playerid][JatekosHP]);
	SetPlayerHealth(playerid, pInfo[playerid][JatekosPancel]);
	SetPlayerFacingAngle(playerid,pInfo[playerid][JatekosAngle]);
	SetPlayerPos(playerid, pInfo[ playerid ][ PosX ] , pInfo[ playerid ][ PosY ] , pInfo[ playerid ][ PosZ ]);
	SetPlayerInterior(playerid, pInfo[ playerid ][ pJatekosInti ]);
	GivePlayerMoney(playerid, pInfo[ playerid ][ pJatekosPenz ]);
	SetPlayerScore(playerid, pInfo[playerid][pJatekosSzint]);
	oratimer[playerid] = SetTimerEx("idotlep", 1000, 1, "i", playerid);
	Player_Logged[playerid] = 1;
	NameValue[playerid] = real;

	return 1;
}
Код:
stock SavePlayer(playerid)
{
        new Float:HP, Float:ARM;
        pInfo[playerid][pJatekosPenz] = GetPlayerMoney(playerid);
        pInfo[playerid][pJatekosSkin] = GetPlayerSkin(playerid);
        pInfo[playerid][pJatekosSzint] = GetPlayerScore(playerid);
		GetPlayerArmour(playerid, ARM);
		GetPlayerHealth(playerid, HP);

		format(query,sizeof(query),"UPDATE `players` SET LogDate = '%s', Admin = %d, JatekosPenz = %d, JatekosSzint = %d, PosX = %f, PosY = %f, PosZ = %f, JatekosInti = %d, JatekosOles = %d, JatekosHalal = %d, JatekosOra = %d, JatekosPerc = %d, JatekosMPerc = %d, JatekosSkin = %d, JatekosHP = %f JatekosPancel = %f, JatekosAngle = %f, JatekosWorld = %d, WHERE `ID` = %d LIMIT 1",
		GetFormatedDate(),
		pInfo[playerid][pAdmin],
		pInfo[playerid][pJatekosPenz],
		pInfo[playerid][pJatekosSzint],
		pInfo[playerid][PosX],
		pInfo[playerid][PosY],
		pInfo[playerid][PosZ],
		pInfo[playerid][pJatekosInti],
		pInfo[playerid][pJatekosOles],
		pInfo[playerid][pJatekosHalal],
		pInfo[playerid][pJatekosOra],
		pInfo[playerid][pJatekosPerc],
		pInfo[playerid][pJatekosMPerc],
		pInfo[playerid][pJatekosSkin],
		pInfo[playerid][JatekosHP],
		pInfo[playerid][JatekosPancel],
		pInfo[playerid][JatekosAngle],
		pInfo[playerid][pJatekosWorld],
		pInfo[playerid][pID]);
		mysql_tquery(SQL, query);
		ResetPlayerVariables(playerid,1);
		return 1;
}
Код:
DIALOG(DIALOG_LOGIN)
{
	if(!response) return KickEx(playerid);
	if(isnull(inputtext)) return ShowLoginDialog(playerid,PHASE_USERNAME);
	format(query,sizeof(query)," SELECT * FROM players WHERE Name = '%s' AND IP = '%s'",inputtext,pIP(playerid));
	new escape[128]; mysql_escape_string(query,escape);
	mysql_query(SQL,query);
	if(!cache_num_rows()) {ShowLoginDialog(playerid,PHASE_USERNAME); ERR(playerid,"No Found Character");}
	else
	{
		SetPlayerName(playerid,inputtext);
		ShowLoginDialog(playerid,PHASE_PASSWORD);
	}
	return 1;
}

DIALOG(DIALOG_REGISTER)
{
	if(!response) return KickEx(playerid);
	if(isnull(inputtext)) return ShowRegisterDialog(playerid,PHASE_USERNAME);
	if(!RolePlayNameCheck(inputtext)) {ShowRegisterDialog(playerid,PHASE_USERNAME); ERR(playerid,"No RP Name");}
	else {SetPlayerName(playerid,inputtext); ShowRegisterDialog(playerid,PHASE_PASSWORD);}
	return 1;
}

DIALOG(DIALOG_LOGIN_PASSWORD)
{
	if(!response) return ShowLoginDialog(playerid,PHASE_USERNAME);
	if(isnull(inputtext)) return ShowLoginDialog(playerid,PHASE_PASSWORD);
	format(query,sizeof(query),"SELECT * FROM players WHERE Name = '%s' AND Password = MD5('%s')",pName(playerid),inputtext);
	new escape[128]; mysql_escape_string(query,escape);
	mysql_query(SQL,query);
	if(!cache_num_rows())
	{
		Player_PasswordTries[playerid]++;
		new string[128]; format(string,sizeof(string),"Wrong Password [%d/%d]",Player_PasswordTries[playerid],MAX_PASSWORD_TRIES);
		ERR(playerid,string);
		if(Player_PasswordTries[playerid] >= MAX_PASSWORD_TRIES) return KickEx(playerid);
		ShowLoginDialog(playerid,PHASE_PASSWORD);
	}
	else
	{
	    // [ Karakter Betцltйs ]
        mysql_format(SQL, query, sizeof(query), "SELECT * FROM `players` WHERE `Name` = '%e' LIMIT 1", pName(playerid));
        mysql_tquery(SQL, query, "KarakterBetoltes", "i", playerid);
		new logdate[64];
		cache_get_value_name(0,"LogDate",logdate,sizeof(logdate));

		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(!OnlineCheck(i)) continue;
			if(GetPlayerALevel(i) <= 0) continue;
			MSGF(i,""COL_GREY"[ID:%d] %s joined the server",playerid,pName(playerid,true));
		}
        MSGF(playerid,""COL_AC"(( OK LOGIN!!LAST LOGIN %s ))", logdate);
		TogglePlayerSpectating(playerid,false);
		PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
		SetPlayerVirtualWorld(playerid,0);
		StopAudioStreamForPlayer(playerid);
		SpawnPlayer(playerid);
	}
	return 1;

}
DIALOG(DIALOG_REGISTER_PASSWORD)
{
	if(!response) return ShowRegisterDialog(playerid,PHASE_USERNAME);
	if(isnull(inputtext)) return ShowRegisterDialog(playerid,PHASE_PASSWORD);
	if(strlen(inputtext) < MIN_PASSWORD_LENGTH || strlen(inputtext) > MAX_PASSWORD_LENGTH)
	{
		ShowRegisterDialog(playerid,PHASE_PASSWORD);
		new string[128]; format(string,sizeof(string),"Password minimum (%d) and maximum (%d) character",MIN_PASSWORD_LENGTH,MAX_PASSWORD_LENGTH);
		ERR(playerid,string);
	}
	else {SetPVarString(playerid,"Password",inputtext); ShowRegisterDialog(playerid,PHASE_PROPERTIES);}
	return 1;
}
DIALOG(DIALOG_PROPERTIES)
{
	if(!response) return ShowRegisterDialog(playerid,PHASE_PASSWORD);
	switch(listitem)
	{
		case P_AGE: Dialog_Show(playerid,DIALOG_P_AGE,DIALOG_STYLE_INPUT,"Age",""COL_WHITE"Please write you age\nAge: 18-60",BUTTON_1,BUTTON_2);
		case P_SEX: Dialog_Show(playerid,DIALOG_P_SEX,DIALOG_STYLE_INPUT,"Nem",""COL_WHITE"A kцvetkező mezőbe, kйrlek add meg a karaktered nemйt!\nNem: Male,Female",BUTTON_1,BUTTON_2);
		case P_COUNTRY: Dialog_Show(playerid,DIALOG_P_COUNTRY,DIALOG_STYLE_INPUT,"asd",""COL_WHITE"A kцvetkező mezőbe, kйrlek add meg a karaktered szбrmazбsбt!\nSzбrmazбs:Бzsia,Afrika,Amerika,Eurуpa,Ausztrбlia,Antarktisz",BUTTON_1,BUTTON_2);
		case P_HEIGHT: Dialog_Show(playerid,DIALOG_P_HEIGHT,DIALOG_STYLE_INPUT,"asd",""COL_WHITE"A kцvetkező mezőbe, kйrlek add meg a karaktered testmagassбgбt!\nTestmagassбg: 140-220",BUTTON_1,BUTTON_2);
		case P_WEIGHT: Dialog_Show(playerid,DIALOG_P_WEIGHT,DIALOG_STYLE_INPUT,"asd",""COL_WHITE"A kцvetkező mezőbe, kйrlek add meg a karaktered testtцmegйt!\nTesttцmeg: 40-150",BUTTON_1,BUTTON_2);
		case MAX_PROPERTIES:
		{
			if(!strcmp(inputtext,"Nem hozhatу lйtre")) return ShowRegisterDialog(playerid,PHASE_PROPERTIES);
			else
		{

		Player_SkinIndex[playerid] = 0;
		new skinid = (!strcmp(Player_Properties[playerid][P_SEX],"Fйrfi",true) ? Skins_Male[Player_SkinIndex[playerid]] : Skins_Female[Player_SkinIndex[playerid]]);

		new string[8]; format(string,sizeof(string),"(%d)",skinid);
		PlayerTextDrawSetString(playerid,SkinEditor[playerid][SKIN_VALUE],string);

                
        new password[32]; GetPVarString(playerid,"Password",password,sizeof(password));
		new properties_string[128];

		for(new i = 0; i < MAX_PROPERTIES; i++)
		{
			new sub[20];
			if(i == MAX_PROPERTIES-1) format(sub,sizeof(sub),"%s",Player_Properties[playerid][i]);
			else format(sub,sizeof(sub),"%s,",Player_Properties[playerid][i]);
			strcat(properties_string,sub);
		}
		new escape[128]; mysql_escape_string(query,escape);
		format(query,sizeof(query),"INSERT INTO players (IP,Name,Password,Properties,RegDate,LogDate,Admin,JatekosPenz,JatekosSzint,PosX,PosY,PosZ,JatekosInti,JatekosOles,JatekosHalal,JatekosOra,JatekosPerc,JatekosMPerc,JatekosSkin,JatekosHP,JatekosPancel,JatekosAngle,JatekosWorld) VALUES ('%s','%s',MD5('%s'),'%s','%s','%s',%d,%d,%d,%f,%f,%f,%d,%d,%d,%d,%d,%d,%d,%f,%f,%f,%d)",
		pIP(playerid),
		pName(playerid),
		password,
		properties_string,
		GetFormatedDate(),
		GetFormatedDate(),
		0,
		1000,
		1,
		1753.3008,
		-1894.0869,
		13.5572,
		0,
		0,
		0,
		0,
		0,
		0,
		26,
		100,
		0,
		266.8277,
		0);
		mysql_tquery(SQL, query, "JatekosID", "i", playerid);
		MSG(playerid,""COL_GREEN"(( Sucesfully Registered ))");
		PlayerPlaySound(playerid,1058,0.0,0.0,0.0);
		ShowLoginDialog(playerid,PHASE_USERNAME);
	
			}
		}
	}
	return 1;
}
forward JatekosID(playerid);
public JatekosID(playerid)
{
	pInfo[playerid][pID] = cache_insert_id();
	return 1;
}
Reply
#2

UP!! how to edit script = NO BUGG... help
Reply
#3

Before looking at your code, Are you sure that you've imported the sql file to your database correctly and that You've defined your database info correctly in your gamemode or mysql.cfg?
Reply
#4

Yes, who wrote that it was a successful accession
Reply
#5

UP!!!
Reply
#6

You can't just post a bundle of code and expect immediate assistance. Your description is very vague.

Can you form a coherent sentence on what your problem is specifically? Data doesn't load or save?

You also have SetPlayerToConnect(playerid); in OnPlayerConnect. Can you post the code for it?
Reply
#7

first and foremost redo the mysql_log to show only errors

next is add:
PHP код:
-d3 
in a file called pawn.cfg in the pawno folder

then repost the logs... All the debugs are showing only debugging process but no errors the info parts are only showing what you inputted such as "SELECT .. etc the error logs on the other hand will pinpoint which error you have.

if you can figure out how to fix it using the debug -d3 and the mysql_log(ERROR) only then your good to go if not post the logs and we'll help you

P.S
I won't quote you guys but you don't need to see the code to fix things, learn to read the logs they are already enough to give you simple hints of what is happening and what is not... Just saying though
Reply
#8

Test Script the ip.scrp.hu:7777
server password: 06020
Reply
#9

LOG

WARNING:

Код:
[15:15:24] [plugins/mysql] mysql_connect: no password specified
Reply
#10

UP!!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)