Jump to content
  • 0

compilling error


Bizzy

Question

8 answers to this question

Recommended Posts

  • 0
struct FCFight
{
	LPCHARACTER pkLeaver;
	DWORD stateType;
	FCombatFight(LPCHARACTER ch, DWORD state) : pkLeaver(ch), stateType(state) {}

	void operator() (LPENTITY ent)
	{
		if (ent->IsType(ENTITY_CHARACTER))
		{
			LPCHARACTER ch = static_cast<LPCHARACTER>(ent);
			if (ch && ch->IsPC())
			{
				switch (stateType)
				{
					case C_FIGHT_ADD:
					{
						TargetInfo * pInfo = CTargetManager::instance().GetTargetInfo(ch->GetPlayerID(), COMBAT_FIGHT_INDEX, pkLeaver->GetVID());
						if (!pInfo)
							CTargetManager::Instance().CreateTarget(ch->GetPlayerID(), C_ZONE_INDEX_TARGET, pkLeaver->GetName(), C_FIGHT_INDEX,pkLeaver->GetVID(), NULL, ch->GetMapIndex(), "1");
					}
					break;

					case C_FIGHT_REMOVE:
						CTargetManager::instance().DeleteTarget(ch->GetPlayerID(), C_FIGHT_INDEX, pkLeaver->GetName());
						break;
				}
			}
		}
	}
};

 

Link to comment
  • 0
  • VIP
15 minutes ago, Bizzy said:
struct FCFight
{
	LPCHARACTER pkLeaver;
	DWORD stateType;
	FCombatFight(LPCHARACTER ch, DWORD state) : pkLeaver(ch), stateType(state) {}

	void operator() (LPENTITY ent)
	{
		if (ent->IsType(ENTITY_CHARACTER))
		{
			LPCHARACTER ch = static_cast<LPCHARACTER>(ent);
			if (ch && ch->IsPC())
			{
				switch (stateType)
				{
					case C_FIGHT_ADD:
					{
						TargetInfo * pInfo = CTargetManager::instance().GetTargetInfo(ch->GetPlayerID(), COMBAT_FIGHT_INDEX, pkLeaver->GetVID());
						if (!pInfo)
							CTargetManager::Instance().CreateTarget(ch->GetPlayerID(), C_ZONE_INDEX_TARGET, pkLeaver->GetName(), C_FIGHT_INDEX,pkLeaver->GetVID(), NULL, ch->GetMapIndex(), "1");
					}
					break;

					case C_FIGHT_REMOVE:
						CTargetManager::instance().DeleteTarget(ch->GetPlayerID(), C_FIGHT_INDEX, pkLeaver->GetName());
						break;
				}
			}
		}
	}
};

 

When he told you to show us the function...he meant the function that generates the error.......

The fix that @WeedHexprovided should work, If I remember correctly there are multiple occurrences in char_item.cpp

  • Love 1

r

Link to comment
  • 0

yes @WeedHex fixed std::vector <LPITEM> item_gets NULL; to std::vector <LPITEM> item_gets; okay

 

CTargetManager::Instance().CreateTarget(ch->GetPlayerID(), C_ZONE_INDEX_TARGET, pkLeaver->GetName(), C_FIGHT_INDEX,pkLeaver->GetVID(), NULL, ch->GetMapIndex(), "1");

 

here is the error NULL

 

 

Link to comment
  • 0

i dont understand what are happening?? DrTurk ..... what is this give a normal answer

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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.