Aller au contenu
Top-Metin2.org - Vous êtes à la recherche d'un serveur Metin 2 ? ×
×
×
  • Créer...
  • 0

Erreur compilation du game


MacDonarty

Question

Bonsoir, 

 

J'ai un soucis en compilant le game : 

 

Voici l'erreur : 

 

 

char.cpp:7490: warning: this decimal constant is unsigned only in ISO C90shop.h: In member function 'void CHARACTER::Destroy()':shop.h:63: error: 'void CShop::RemoveGuest(CHARACTER*)' is protectedchar.cpp:517: error: within this contextshop.h: In member function 'void CHARACTER::Disconnect(const char*)':shop.h:63: error: 'void CShop::RemoveGuest(CHARACTER*)' is protectedchar.cpp:1421: error: within this contextshop.h: In member function 'void CHARACTER::OnClick(CHARACTER*)':shop.h:63: error: 'void CShop::RemoveGuest(CHARACTER*)' is protectedchar.cpp:5116: error: within this contextshop.h:62: error: 'virtual bool CShop::AddGuest(CHARACTER*, DWORD, bool)' is protectedchar.cpp:5123: error: within this contextchar.cpp: In member function 'void CHARACTER::LoadGiftPage(int)':char.cpp:7553: warning: comparison between signed and unsigned integer expressionschar.cpp: In member function 'void CHARACTER::OpenMyShop(const char*, TShopItemTable*, BYTE, DWORD)':char.cpp:7694: warning: comparison between signed and unsigned integer expressionschar.cpp:7716: warning: comparison between signed and unsigned integer expressionschar.cpp: In member function 'void CHARACTER::UpdateShopItems()':char.cpp:7972: warning: comparison is always false due to limited range of data typeshop.h:69: error: 'void CShop::BroadcastUpdateItem(BYTE)' is protectedchar.cpp:8017: error: within this contextchar.cpp: In member function 'void CHARACTER::OpenShop(DWORD, const char*, bool)':char.cpp:8146: warning: comparison is always false due to limited range of data typechar.cpp:8120: warning: unused variable 'c'gmake: *** [OBJDIR/char.o] Error 1

 

 

Je ne comprend pas comment résoudre cette erreur (avec le "is protected") voici mon shop.h : 

 

 

#ifndef __INC_METIN_II_GAME_SHOP_H__#define __INC_METIN_II_GAME_SHOP_H__enum{SHOP_MAX_DISTANCE = 1000};class CGrid;/* ---------------------------------------------------------------------------------- */class CShop{public:	typedef struct shop_item	{		DWORD	vnum;		// 아이템 번호		#ifdef FULL_YANG		long	long	price;		// °ˇ°Y		#else		DWORD	price;		// °ˇ°Y		#endif		BYTE	count;		// 아이템 개수		LPITEM	pkItem;		int		itemid;		// 아이템 고유아이디		shop_item()		{			vnum = 0;			price = 0;			count = 0;			itemid = 0;			pkItem = NULL;		}	} SHOP_ITEM;	CShop();	~CShop();#ifdef OFFLINE_SHOPpublic:int		GetItemCount();bool	GetItems();void	SetLocked(bool val) { m_bLocked = val; }bool	IsLocked() { return m_bLocked; }void	RemoveGuests(LPCHARACTER except=NULL);void	ClearItems();void	SetPrivShopItems(std::vector map_shop);LPCHARACTER GetPC() { return m_pkPC; }protected:bool					m_bLocked;#endif	bool	Create(DWORD dwVnum, DWORD dwNPCVnum, TShopItemTable * pItemTable);	void	SetShopItems(TShopItemTable * pItemTable, BYTE bItemCount);	virtual void	SetPCShop(LPCHARACTER ch);	virtual bool	IsPCShop()	{ return m_pkPC ? true : false; }	// 게스트 추가/삭제	virtual bool	AddGuest(LPCHARACTER ch,DWORD owner_vid, bool bOtherEmpire);	void	RemoveGuest(LPCHARACTER ch);	// 물건 구입	virtual int	Buy(LPCHARACTER ch, BYTE pos);	// 게스트에게 패킷을 보냄	void	BroadcastUpdateItem(BYTE pos);	// 판매중인 아이템의 갯수를 알려준다.	int		GetNumberByVnum(DWORD dwVnum);	// 아이템이 상점에 등록되어 있는지 알려준다.	virtual bool	IsSellingItem(DWORD itemID);	DWORD	GetVnum() { return m_dwVnum; }	DWORD	GetNPCVnum() { return m_dwNPCVnum; }protected:	void	Broadcast(const void * data, int bytes);protected:	DWORD				m_dwVnum;	DWORD				m_dwNPCVnum;	CGrid *				m_pGrid;	typedef TR1_NS::unordered_map GuestMapType;	GuestMapType m_map_guest;	std::vector		m_itemVector;	// 이 상점에서 취급하는 물건들	LPCHARACTER			m_pkPC;};#endif 

 

 

Merci de m'aider si possible ^^^

 

A bientôt ! :)

 

EDIT FINALE : J'ai tout corrigé petit à petit ^^

Lien vers le commentaire
Partager sur d’autres sites

  • Réponses 4
  • Créé
  • Dernière réponse

Meilleurs contributeurs dans cette question

Jours populaires

Meilleurs contributeurs dans cette question

4 réponses à cette question

Messages recommandés

  • 0

Bonsoir,

 

Il faudrait que tu remonte plus haut (utilise putty) pour trouver la première erreur qu'à rencontrée la compilation.

 

Cordialement.

 

 

 

ça bien de putty justement ::) Je remonte où j'ai lancé la compilation :

 

 

root@host:/usr/src/mainline/Srcs/Server/game/src # gmake defaultcompile TempleOchao.cppcompile questlua_TempleOchao.cppcompile MeleyLair.cppcompile questlua_MeleyLair.cppcompile acce.cppacce.cpp: In function 'void FN_remove_material(CItem**, DWORD, int, int)':acce.cpp:87: warning: unused variable 'count'acce.cpp: In function 'bool Acce_InformationInitialize()':acce.cpp:943: warning: comparison between signed and unsigned integer expressionscompile BattleArena.cppcompile FSM.cppcompile MarkConvert.cppcompile MarkImage.cppcompile MarkManager.cppcompile OXEvent.cppcompile TrafficProfiler.cppcompile ani.cppcompile arena.cppcompile banword.cppcompile battle.cppcompile blend_item.cppcompile block_country.cppcompile buffer_manager.cppcompile building.cppcompile castle.cppcompile char.cppchar.cpp:7490: warning: this decimal constant is unsigned only in ISO C90shop.h: In member function 'void CHARACTER::Destroy()':shop.h:63: error: 'void CShop::RemoveGuest(CHARACTER*)' is protectedchar.cpp:517: error: within this contextshop.h: In member function 'void CHARACTER::Disconnect(const char*)':shop.h:63: error: 'void CShop::RemoveGuest(CHARACTER*)' is protectedchar.cpp:1421: error: within this contextshop.h: In member function 'void CHARACTER::OnClick(CHARACTER*)':shop.h:63: error: 'void CShop::RemoveGuest(CHARACTER*)' is protectedchar.cpp:5116: error: within this contextshop.h:62: error: 'virtual bool CShop::AddGuest(CHARACTER*, DWORD, bool)' is protectedchar.cpp:5123: error: within this contextchar.cpp: In member function 'void CHARACTER::LoadGiftPage(int)':char.cpp:7553: warning: comparison between signed and unsigned integer expressionschar.cpp: In member function 'void CHARACTER::OpenMyShop(const char*, TShopItemTable*, BYTE, DWORD)':char.cpp:7694: warning: comparison between signed and unsigned integer expressionschar.cpp:7716: warning: comparison between signed and unsigned integer expressionschar.cpp: In member function 'void CHARACTER::UpdateShopItems()':char.cpp:7972: warning: comparison is always false due to limited range of data typeshop.h:69: error: 'void CShop::BroadcastUpdateItem(BYTE)' is protectedchar.cpp:8017: error: within this contextchar.cpp: In member function 'void CHARACTER::OpenShop(DWORD, const char*, bool)':char.cpp:8146: warning: comparison is always false due to limited range of data typechar.cpp:8120: warning: unused variable 'c'gmake: *** [OBJDIR/char.o] Error 1root@host:/usr/src/mainline/Srcs/Server/game/src #

 

 

merci ! :)

Lien vers le commentaire
Partager sur d’autres sites

  • 0

Bon j'ai bougé la partie que j'ai rajouté dans le shop.h j'avais oublié des tabulations apparament et j'ai mis la partie plus bas dans le code. Je continue de corriger d'autre erreur la ^^

J'ai ça la : 

 

 

compile cmd_general.cppcmd_general.cpp: In function 'void do_shop_update_item(CHARACTER*, const char*, int, int)':cmd_general.cpp:1563: warning: comparison is always false due to limited range of data typecmd_general.cpp:1567: warning: comparison is always false due to limited range of data typecmd_general.cpp:1572: warning: comparison is always false due to limited range of data typecmd_general.cpp:1587: error: 'szSockets' was not declared in this scopecmd_general.cpp:1587: error: 'szAttrs' was not declared in this scopecmd_general.cpp:1601: error: 'GetPlayerID' was not declared in this scopecmd_general.cpp:1601: error: 'GetName' was not declared in this scopecmd_general.cpp:1602: error: 'ChatPacket' was not declared in this scopecmd_general.cpp: In function 'void do_shop_refresh_items(CHARACTER*, const char*, int, int)':cmd_general.cpp:1766: warning: operation on 'col' may be undefinedcmd_general.cpp:1755: warning: unused variable 'c'cmd_general.cpp: In function 'void do_CubePetAdd(CHARACTER*, const char*, int, int)':cmd_general.cpp:3210: warning: unused variable 'strArg1'gmake: *** [OBJDIR/cmd_general.o] Error 1

 

 

Voici la partie concerné dans le cmd_general.cpp : 

 

ifndef FULL_YANG		{			long long nTotalMoney=price;			SQLMsg * pkMsg(DBManager::instance().DirectQuery("SELECT price from player_shop_items where shop_id='%d'", szSockets,szAttrs,shop_id));			SQLResult * pRes = pkMsg->Get();

 

 

Merci

Lien vers le commentaire
Partager sur d’autres sites

Invité
Ce sujet ne peut plus recevoir de nouvelles réponses.


  • brilliantdiscord_widget
  • Flux d'Activité

    1. 37
    2. 21

      Metin2 en 2020 peut-on en parler?

    3. 0

      METIN2Project

    4. 3

      Ressources - UnPack - Metin2 Client - Officiel

    5. 0

      Barre des tâches d'argent étendue

    6. 16

      Redémarrage automatique des channels

    7. 16

      Multi Logo GM / SGM / GA

  • En ligne récemment

    • Aucun utilisateur enregistré regarde cette page.

Information importante

Conditions d’utilisation / Politique de confidentialité / Règles / Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.