Jump to content

Erro Compilar Source Server


NeverMindz
 Share

Recommended Posts

  • Replies 50
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

O teu original é:

		case ITEM_ROD:
			{
				if (bAdd)
				{
					if (m_wCell == INVENTORY_MAX_NUM + WEAR_WEAPON)
						m_pOwner->SetPart(PART_WEAPON, GetVnum());
				}
				else
				{
					if (m_wCell == INVENTORY_MAX_NUM + WEAR_WEAPON)
#ifdef __WEAPON_COSTUME_SYSTEM__
						m_pOwner->SetPart(PART_WEAPON, 0);
#else
						m_pOwner->SetPart(PART_WEAPON, m_pOwner->GetOriginalPart(PART_WEAPON));
#endif
				}
			}
			break;

No tutorial diz:

https://i.tlthings.net/image/xTm

Como o teu código do SetPart é diferente, deves adaptar o tutorial para corresponder ao código que já tens, ficando:

		case ITEM_ROD:
			{
				if (bAdd)
				{
#ifdef __CHANGELOOK_SYSTEM__
					DWORD dwRes = GetTransmutation() != 0 ? GetTransmutation() : GetVnum();
					if (m_wCell == INVENTORY_MAX_NUM + WEAR_WEAPON)
						m_pOwner->SetPart(PART_WEAPON, dwRes);
#else
					if (m_wCell == INVENTORY_MAX_NUM + WEAR_WEAPON)
						m_pOwner->SetPart(PART_WEAPON, GetVnum());
#endif
				}
				else
				{
					if (m_wCell == INVENTORY_MAX_NUM + WEAR_WEAPON)
#ifdef __WEAPON_COSTUME_SYSTEM__
						m_pOwner->SetPart(PART_WEAPON, 0);
#else
						m_pOwner->SetPart(PART_WEAPON, m_pOwner->GetOriginalPart(PART_WEAPON));
#endif
			}
			break;

P.S: Também tinha uma } a mais antes do break, o que fechava o switch. Isso não podia ser pois tinhas mais cases a seguir.

Link to comment
Share on other sites

1 hora atrás, NeverMindz disse:

Obrigado, resolvi esse agora tenho outro :S

http://prntscr.com/jclwu0

Se você voltar as pastas vai ver que tem outros locais certo? 

1i83mzV.png

Basta entrar na libgame e dentro da pasta src compilar. joga esse diretório no Putty com gmake -j20 depois compile novamente.

7EmSTjb.png

Edited by Otresher
Link to comment
Share on other sites

Isso está a compilar as libs também?

Quais os passos todos que fazes para compilar? Parece que estás apenas a compilar o game.

Deves usar a makefile principal, não ir até à pasta do game e compilar a partir de lá, pois assim irá ignorar as libs e a db.

____

Nunca fazes gmake -j20, pois de certeza que o teu procesador não tem 20 cores.

Argumento -j equivale ao número de jobs, ou seja de ficheiros a serem compilados ao mesmo tempo.

Idealmente deve ser igual ao número de cores que tens. Um valor demasiado grande consegue abrandar mais o tempo de compilação do que sem valor.

Link to comment
Share on other sites

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
 Share


×
×
  • Create New...