guild.cpp: In constructor 'CGuild::CGuild(TGuildCreateParameter&)':
guild.cpp:56: error: no matching function for call to 'CGuildSafeBox::CGuildSafeBox()'
guild_safebox.h:14: note: candidates are: CGuildSafeBox::CGuildSafeBox(CGuild*)
guild_safebox.h:12: note: CGuildSafeBox::CGuildSafeBox(const CGuildSafeBox&)
guild.cpp:61: error: no match for call to '(CGuildSafeBox) (CGuild* const)'
guild.cpp:64: error: expected `;' before 'm_general_count'
Makefile:134: recipe for target 'OBJDIR/guild.o' failed
gmake: *** [OBJDIR/guild.o] Error 1
In file included from Main.cpp:20:
GuildSafeboxManager.h:67: error: 'GUILD_SAFEBOX_PASSWORD_MAX_LEN' was not declared in this scope
GuildSafeboxManager.h:70: error: 'GUILD_SAFEBOX_MAX_NUM' was not declared in this scope
GuildSafeboxManager.h:71: error: 'GUILD_SAFEBOX_MAX_NUM' was not declared in this scope
GuildSafeboxManager.h: In member function 'void CGuildSafebox::SetPassword(const char*)':
GuildSafeboxManager.h:36: error: 'm_szPassword' was not declared in this scope
GuildSafeboxManager.h: In member function 'const char* CGuildSafebox::GetPassword()':
GuildSafeboxManager.h:37: error: 'm_szPassword' was not declared in this scope
GuildSafeboxManager.h: In member function 'bool CGuildSafebox::CheckPassword(const char*) const':
GuildSafeboxManager.h:38: error: 'm_szPassword' was not declared in this scope
GuildSafeboxManager.h: In member function 'const TPlayerItem* CGuildSafebox::GetItem(BYTE) const':
GuildSafeboxManager.h:59: error: 'm_pItems' was not declared in this scope
Makefile:58: recipe for target '.obj/Main.o' failed
gmake: *** [.obj/Main.o] Error 1
#ifdef __GUILD_SAFEBOX__ : m_SafeBox(this) #endif
{
CGuild::CGuild(TGuildCreateParameter & cp)
{
Initialize();
#include "../common/service.h"
Dir is aber bekannt, dass this in manchen compilern n const pointer darstellt oder?Quote:
@Sєηтιηαℓz:
In der Game hast du vermutlich in der guild.cpp beim Konstruktor "CGuild::CGuild" die Veränderungunter die öffnende KlammerCode:#ifdef __GUILD_SAFEBOX__ : m_SafeBox(this) #endifgeschrieben. Beachte, dass es zwischen den folgenden Codeteilen stehen muss:Code:{undCode:CGuild::CGuild(TGuildCreateParameter & cp)Zu der DB: geh mal in deine "stdafx.h" und verändere die "#include"-Teile so, dassCode:{ Initialize();ganz oben steht.Code:#include "../common/service.h"
Mit Matrosengrüßen,
Der Tiger
Ein TigerQuote:
9.3.2 The this pointer
In the body of a non-static (9.3) member function, the keyword this is a prvalue expression whose value is the address of the object for which the function is called. The type of this in a member function of a class X is X*. If the member function is declared const, the type of this is const X*, if the member function is declared volatile, the type of this is volatile X*, and if the member function is declared const volatile, the type of this is const volatile X*. [ Note: thus in a const member function, the object for which the function is called is accessed through a const access path. —end note ]
linking ...
.obj/Main.o: In function `main':
/usr/senti/mainline_released/mainline_sg/Srcs/Server/db/src/Main.cpp:89: undefined reference to `CGuildSafeboxManager::CGuildS afeboxManager()'
/usr/senti/mainline_released/mainline_sg/Srcs/Server/db/src/Main.cpp:102: undefined reference to `CGuildSafeboxManager::Initia lize()'
/usr/senti/mainline_released/mainline_sg/Srcs/Server/db/src/Main.cpp:130: undefined reference to `CGuildSafeboxManager::~CGuil dSafeboxManager()'
.obj/ClientManager.o: In function `CClientManager::QUERY_BOOT(CPeer*, SPacketGDBoot*)':
/usr/senti/mainline_released/mainline_sg/Srcs/Server/db/src/ClientManager.cpp:379: undefined reference to `CGuildSafeboxManage r::InitSafeboxCore(CPeer*)'
.obj/ClientManager.o: In function `CClientManager::AnalyzeQueryResult(_SQLMsg*)':
/usr/senti/mainline_released/mainline_sg/Srcs/Server/db/src/ClientManager.cpp:2883: undefined reference to `CGuildSafeboxManag er::QueryResult(CPeer*, _SQLMsg*, int)'
.obj/ClientManager.o: In function `CClientManager::ProcessPackets(CPeer*)':
/usr/senti/mainline_released/mainline_sg/Srcs/Server/db/src/ClientManager.cpp:2716: undefined reference to `CGuildSafeboxManag er::ProcessPacket(CPeer*, unsigned int, unsigned char, void const*)'
.obj/ClientManager.o: In function `CClientManager::Process()':
/usr/senti/mainline_released/mainline_sg/Srcs/Server/db/src/ClientManager.cpp:3105: undefined reference to `CGuildSafeboxManag er::Update()'
.obj/ClientManager.o: In function `CClientManager::MainLoop()':
/usr/senti/mainline_released/mainline_sg/Srcs/Server/db/src/ClientManager.cpp:232: undefined reference to `CGuildSafeboxManage r::Destroy()'
Makefile:53: recipe for target '/usr/senti/compiled/db/db_r_senti_apple' failed
gmake: *** [/usr/senti/compiled/db/db_r_senti_apple] Error 1
compile battle.cpp
In file included from battle.cpp:15:
guild.h: In constructor 'CGuild::CGuild(DWORD)':
guild.h:163: error: no matching function for call to 'CGuildSafeBox::CGuildSafeBox()'
guild_safebox.h:15: note: candidates are: CGuildSafeBox::CGuildSafeBox(CGuild*)
guild_safebox.h:12: note: CGuildSafeBox::CGuildSafeBox(const CGuildSafeBox&)
Makefile:134: recipe for target 'OBJDIR/battle.o' failed
gmake: *** [OBJDIR/battle.o] Error 1
explicit CGuild(DWORD guild_id) { Load(guild_id); }
#ifdef __GUILD_SAFEBOX__
explicit CGuild(DWORD guild_id) : m_SafeBox(this) { Load(guild_id); }
#else
explicit CGuild(DWORD guild_id) { Load(guild_id); }
#endif
g++ 4.2.1 hat den Fehler.Quote:
Ich kenne keinen Compiler, bei dem der this-Pointer immer Konstant wäre. Der this-Pointer wird konstant, sobald du ihn in einer const-Funktion benutzt - andernfalls ist er nicht konstant. Da ich mich natürlich irren kann, habe ich eben danach nochmal gesucht und folgende Seite gefunden: [Only registered and activated users can see links. Click Here To Register...]
Siehe Screen: [Only registered and activated users can see links. Click Here To Register...]
Wenn du mir einen Compiler nennen kannst, bei dem das zutrifft, was du sagtest, würde ich mehr sehr freuen; ich lerne gerne dazu.
€dit: Eine Quote aus einer Erklärung zum this-Pointer:
Ein Tiger
Habe ich bereitsQuote:
DB: Bei dir fehlt in der Makefile der Eintrag unter den CPP-Dateien "GuildSafeboxManager.cpp"
Game: Schau mal in der guild.h; da müsste etwas like this stehen :das änderst du zu:Code:explicit CGuild(DWORD guild_id) { Load(guild_id); }Ein TigerCode:#ifdef __GUILD_SAFEBOX__ explicit CGuild(DWORD guild_id) : m_SafeBox(this) { Load(guild_id); } #else explicit CGuild(DWORD guild_id) { Load(guild_id); } #endif
ignor that unless you are making a windows server in that case :Quote:
Habe ich bereits
[Only registered and activated users can see links. Click Here To Register...]
#include <windows.h>
#ifdef win32 #include <windows.h> #endif
#if defined(win32) #include <windows.h> #endif
You're right to ignore this, but it's not really a bug. It happens because in that file is the "stdafx.h" not included and so it cannot know the types. If you open a .cpp-file that includes the header-file then you'll see that the "bug" is solved.Quote:
ignor that unless you are making a windows server in that case :
you can use a define like this for windows :Code:#include <windows.h>
or like this :Code:#ifdef win32 #include <windows.h> #endif
feel free to use any of them btw its a vs bug , some time this happen just like that . btw stdafx should already have something like thisCode:#if defined(win32) #include <windows.h> #endif
compile GuildSafeboxManager.cpp
GuildSafeboxManager.cpp: In member function 'void CGuildSafebox::LoadItems(SQLMsg*)':
GuildSafeboxManager.cpp:79: error: 'struct TPlayerItem' has no member named 'is_gm_owner'
GuildSafeboxManager.cpp: In member function 'void CGuildSafeboxManager::SaveSingleItem(TPlayerItem*)':
GuildSafeboxManager.cpp:498: error: 'struct SPlayerItem' has no member named 'is_gm_owner'
Makefile:57: recipe for target '.obj/GuildSafeboxManager.o' failed
gmake: *** [.obj/GuildSafeboxManager.o] Error 1
is_gm_owner überall entfernen.Quote:
Weitere Fehler:
DB:
Mir fehlt die is_gm_owner class
PHP Code:compile GuildSafeboxManager.cpp
GuildSafeboxManager.cpp: In member function 'void CGuildSafebox::LoadItems(SQLMsg*)':
GuildSafeboxManager.cpp:79: error: 'struct TPlayerItem' has no member named 'is_gm_owner'
GuildSafeboxManager.cpp: In member function 'void CGuildSafeboxManager::SaveSingleItem(TPlayerItem*)':
GuildSafeboxManager.cpp:498: error: 'struct SPlayerItem' has no member named 'is_gm_owner'
Makefile:57: recipe for target '.obj/GuildSafeboxManager.o' failed
gmake: *** [.obj/GuildSafeboxManager.o] Error 1
Kind regards
Senti
310 16:52:30471 :: File "networkModule.py", line 247, in SetGamePhase
0310 16:52:30472 :: File "game.py", line 105, in init
0310 16:52:30472 :: File "interfaceModule.py", line 291, in MakeInterface
0310 16:52:30472 :: File "interfaceModule.py", line 180, in __MakeWindows
0310 16:52:30472 :: File "uiSafebox.py", line 206, in init
0310 16:52:30473 :: AttributeError
0310 16:52:30473 :: :
0310 16:52:30473 :: 'SafeboxWindow' object has no attribute '_SafeboxWindow__LoadWindow'
0310 16:52:30473 ::
0310 16:52:50033 :: Traceback (most recent call last):
0310 16:52:50033 :: File "game.py", line 815, in RefreshInventory
0310 16:52:50034 :: File "interfaceModule.py", line 579, in RefreshInventory
0310 16:52:50035 :: AttributeError
0310 16:52:50035 :: :
0310 16:52:50037 :: 'NoneType' object has no attribute 'RefreshQuickSlot'
0310 16:52:50037 ::
0310 16:52:50038 :: Traceback (most recent call last):
0310 16:52:50038 :: File "game.py", line 815, in RefreshInventory
0310 16:52:50039 :: File "interfaceModule.py", line 579, in RefreshInventory