Quote:
Originally Posted by Lordzy
You've not given the data to be entered for 'p_mail' and it expects an ID to locate the row that has to be updated. You've given data only upto 'p_gas'. I'm not sure if there are any other errors, it's a long query and I didn't spend much time reading it.
EDIT : Late.
|
Thank you ! I have another problem ...
Код:
[11:27:39 01/10/17] [WARNING] CMySQLHandle::Create - connection already exists
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_ammo") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_reload") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_weapontype") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_posx") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_float - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_posy") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_float - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_posz") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_float - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_skin") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_interior") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_vw") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_health") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_float - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_tutorial") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_race") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_gender") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_group") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_dise") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_quest") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_bleeding") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_hunger") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_thirst") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_keys") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_bullet") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_weaponsecondary") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_nicolasmission1") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_nicolasmission2") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_davemission1") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_davemission2") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
[11:28:03 01/10/17] [WARNING] CMySQLResult::GetRowDataByName - field not found ("p_gas") (Query: "SELECT * FROM `players` WHERE `p_name` = 'Prince_Jess' LIMIT 1")
[11:28:03 01/10/17] [ERROR] cache_get_field_content_int - invalid datatype
Код:
in dialogresponse
case DIALOG_LOG :
{
new query[1024], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str3, sizeof(str3),"{FFFFFF}Welcome to {FFFF82}%s!\n{FFFFFF}플레이 하기 위해 당신의 계정을 아래 입력하시길 바랍니다.\n아래 당신이 사용하던 패스워드를 입력하십시오.",playerName[playerid]);
if(response)
{
if(!strlen(inputtext))
return ShowPlayerDialog(playerid, DIALOG_LOG, DIALOG_STYLE_PASSWORD, "로그인", str3, "생성","");
if(!strcmp(inputtext, playerData[playerid][password], false))
{
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `players` WHERE `p_name` = '%e' LIMIT 1", name);
mysql_tquery(mysql, query, "onAccountLoad", "i", playerid);
}
else
ShowPlayerDialog(playerid, DIALOG_LOG, DIALOG_STYLE_PASSWORD, "로그인", str3, "생성","");
}
}
Код:
forward onAccountLoad(playerid);
public onAccountLoad(playerid)
{
new str[32];
playerData[playerid][pAmmo] = cache_get_field_content_int(0, "p_ammo");
playerData[playerid][pReload] = cache_get_field_content_int(0, "p_reload");
playerData[playerid][pWeaponType] = cache_get_field_content_int(0, "p_weapontype");
playerData[playerid][pSaveX] = cache_get_field_content_float(0, "p_posx");
playerData[playerid][pSaveY] = cache_get_field_content_float(0, "p_posy");
playerData[playerid][pSaveZ] = cache_get_field_content_float(0, "p_posz");
playerData[playerid][pSkin] = cache_get_field_content_int(0, "p_skin");
playerData[playerid][pInterior] = cache_get_field_content_int(0, "p_interior");
playerData[playerid][pVw] = cache_get_field_content_int(0, "p_vw");
playerData[playerid][pHealth] = cache_get_field_content_float(0, "p_health");
playerData[playerid][pTutorial] = cache_get_field_content_int(0, "p_tutorial");
playerData[playerid][pRace] = cache_get_field_content_int(0, "p_race");
playerData[playerid][pGender] = cache_get_field_content_int(0, "p_gender");
playerData[playerid][pGroup] = cache_get_field_content_int(0, "p_group");
playerData[playerid][pDise] = cache_get_field_content_int(0, "p_dise");
playerData[playerid][pQuest] = cache_get_field_content_int(0, "p_quest");
playerData[playerid][pBleeding] = cache_get_field_content_int(0, "p_bleeding");
playerData[playerid][pHunger] = cache_get_field_content_int(0, "p_hunger");
playerData[playerid][pThirst] = cache_get_field_content_int(0, "p_thirst");
playerData[playerid][pKeys] = cache_get_field_content_int(0, "p_keys");
playerData[playerid][pBullet] = cache_get_field_content_int(0, "p_bullet");
playerData[playerid][pWeaponSecondary] = cache_get_field_content_int(0, "p_weaponsecondary");
playerData[playerid][pNicolasMission1] = cache_get_field_content_int(0, "p_nicolasmission1");
playerData[playerid][pNicolasMission2] = cache_get_field_content_int(0, "p_nicolasmission2");
playerData[playerid][pDaveMission1] = cache_get_field_content_int(0, "p_davemission1");
playerData[playerid][pDaveMission2] = cache_get_field_content_int(0, "p_davemission2");
playerData[playerid][pGas] = cache_get_field_content_int(0, "p_gas");
cache_get_field_content(0, "p_mail", playerData[playerid][mail], mysql, 64);
for(new i=0; i<sizeof(itemData); i++)
{
format(str, sizeof(str),"item_%d",i);
playerItem[playerid][i] = cache_get_field_content_int(0, str);
}
loginTextDraw(playerid, false);
TogglePlayerSpectating(playerid, false);
fadeScreen(playerid, true);
if(playerData[playerid][pTutorial] == 1)
showConditionTextDraw(playerid);
login[playerid] = true;
return true;
}