Jump to content

Niko. Developer

Banned
  • Posts

    39
  • Joined

  • Last visited

  • Days Won

    2
  • Feedback

    0%

Posts posted by Niko. Developer

  1. 3 minutes ago, Tasho said:

     

    Thanks for release, but the code style is very bad, should look like this.

    
    int party_check_item(lua_State* L)
    {
    	if (!lua_isnumber(L, 1))
    	{
    		lua_pushboolean(L, false);
    		return 1;
    	}
    		
    	LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
    	lua_pushboolean(L, (ch && ch->GetParty()) ? ch->GetParty()->CheckItem(lua_tonumber(L, 1)) : false));
    	return 1;
    }
    
    bool CParty::CheckItem(int itemVnum)
    {
    	int iCount = 0;
    	itertype(m_memberMap) it = m_memberMap.begin();
    
    	for (; it != m_memberMap.end(); it++)
    	{
    		if (it->second.pCharacter && it->second.pCharacter->CountSpecifyItem(itemVnum))
    			iCount++;
    	}
    
    	if (GetNearMemberCount() <= iCount)
    	{
    		for (; it != m_memberMap.end(); it++)
    		{
    			if (it->second.pCharacter && it->second.pCharacter->CountSpecifyItem(itemVnum))
    				it->second.pCharacter->RemoveSpecifyItem(itemVnum);
    		}
    		
    		return true;
    	}
    
    	return false;
    }

     

    364829827469148160.png364829827469148160.png364829827469148160.png

    • Sad 2
    • Love 1
  2. On 2017. 11. 07. at 11:44 PM, tierrilopes said:

    db/ClientManagerLogin.cpp

     

    You got unmatched ` probably

     

    Edit

    Downloaded and checked.

    db/ClientManagerLogin.cpp

    search for:

    
    "SELECT id, `name`, job, level, playtime, st, ht, dx, iq, part_main, part_hair, x, y, skill_group, change_name FROM player%s WHERE account_id=%u",

    Replace with: (2 times)

    
    "SELECT id, name, job, level, playtime, st, ht, dx, iq, part_main, part_hair, x, y, skill_group, change_name FROM player%s WHERE account_id=%u",

     

    https://dev.mysql.com/doc/refman/5.7/en/keywords.html

    ---

    On 2017. 11. 07. at 11:33 PM, Aliano said:

    still this error in db syserr with your new prebuilt files:

     

    
    SYSERR: Nov  7 22:31:52 :: DirectQuery: AsyncSQL::DirectQuery : mysql_query error: 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 '1=24 WHERE `id`=13' at line 1
    query: UPDATE player_index SET `pid`1=24 WHERE `id`=13
    

     

    and the same problem

    db/ClientManagerPlayer.cpp

    snprintf(queryStr, sizeof(queryStr), "UPDATE player_index%s SET `pid`%d=%d WHERE `id`=%d",

    this should be:

    snprintf(queryStr, sizeof(queryStr), "UPDATE player_index%s SET `pid%d`=%d WHERE `id`=%d",

     

    • Metin2 Dev 4
    • Love 2
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.