|
|
#1 |
![]() Join Date: Aug 2010
Reputation: 7
Posts: 28
|
CTeamplayRoundBasedRules
Scratch SDK 2007:
trying to change baseclass for CSDKGameRules added REGISTER_GAMERULES_CLASS( CTeamplayRoundBasedRules ); changed class CSDKGameRules : public CTeamplayRoundBasedRules and DECLARE_CLASS( CSDKGameRules, CTeamplayRoundBasedRules ); but got this: Code:
LNK2019: unresolved external symbol "public: __thiscall CTeamplayRoundBasedRules::CTeamplayRoundBasedRules(void)" (??0CTeamplayRoundBasedRules@@QAE@XZ) referenced in function "public: __thiscall CSDKGameRules::CSDKGameRules(void)" (??0CSDKGameRules@@QAE@XZ) sdk_gamerules.obj Server LNK2001: unresolved external symbol "protected: virtual void __thiscall CTeamplayRoundBasedRules::CheckChatText(class CBasePlayer *,char *)" (?CheckChatText@CTeamplayRoundBasedRules@@MAEXPAVCBasePlayer@@PAD@Z) sdk_gamerules.obj Server LNK2001: unresolved external symbol "public: virtual void __thiscall CTeamplayRoundBasedRules::HandleTimeLimitChange(void)" (?HandleTimeLimitChange@CTeamplayRoundBasedRules@@UAEXXZ) sdk_gamerules.obj Server LNK2001: unresolved external symbol "public: virtual bool __thiscall CTeamplayRoundBasedRules::TimerMayExpire(void)" (?TimerMayExpire@CTeamplayRoundBasedRules@@UAE_NXZ) sdk_gamerules.obj Server LNK2001: unresolved external symbol "public: virtual void __thiscall CTeamplayRoundBasedRules::SetWinningTeam(int,int,bool,bool,bool)" (?SetWinningTeam@CTeamplayRoundBasedRules@@UAEXHH_N00@Z) sdk_gamerules.obj Server LNK2001: unresolved external symbol "public: virtual void __thiscall CTeamplayRoundBasedRules::SetStalemate(int,bool,bool)" (?SetStalemate@CTeamplayRoundBasedRules@@UAEXH_N0@Z) sdk_gamerules.obj Server LNK2001: unresolved external symbol "public: virtual float __thiscall CTeamplayRoundBasedRules::GetNextRespawnWave(int,class CBasePlayer *)" (?GetNextRespawnWave@CTeamplayRoundBasedRules@@UAEMHPAVCBasePlayer@@@Z) sdk_gamerules.obj Server LNK2001: unresolved external symbol "public: virtual bool __thiscall CTeamplayRoundBasedRules::HasPassedMinRespawnTime(class CBasePlayer *)" (?HasPassedMinRespawnTime@CTeamplayRoundBasedRules@@UAE_NPAVCBasePlayer@@@Z) sdk_gamerules.obj Server LNK2001: unresolved external symbol "public: virtual bool __thiscall CTeamplayRoundBasedRules::RoundCleanupShouldIgnore(class CBaseEntity *)" (?RoundCleanupShouldIgnore@CTeamplayRoundBasedRules@@UAE_NPAVCBaseEntity@@@Z) sdk_gamerules.obj Server LNK2001: unresolved external symbol "public: virtual bool __thiscall CTeamplayRoundBasedRules::ShouldCreateEntity(char const *)" (?ShouldCreateEntity@CTeamplayRoundBasedRules@@UAE_NPBD@Z) sdk_gamerules.obj Server LNK2001: unresolved external symbol "public: virtual void __thiscall CTeamplayRoundBasedRules::SetSetup(bool)" (?SetSetup@CTeamplayRoundBasedRules@@UAEX_N@Z) sdk_gamerules.obj Server LNK2001: unresolved external symbol "public: virtual void __thiscall CTeamplayRoundBasedRules::RestartTournament(void)" (?RestartTournament@CTeamplayRoundBasedRules@@UAEXXZ) sdk_gamerules.obj Server LNK2001: unresolved external symbol "protected: virtual bool __thiscall CTeamplayRoundBasedRules::CheckWinLimit(void)" (?CheckWinLimit@CTeamplayRoundBasedRules@@MAE_NXZ) sdk_gamerules.obj Server LNK2001: unresolved external symbol "protected: virtual int __thiscall CTeamplayRoundBasedRules::CountActivePlayers(void)" (?CountActivePlayers@CTeamplayRoundBasedRules@@MAEHXZ) sdk_gamerules.obj Server LNK2001: unresolved external symbol "protected: virtual void __thiscall CTeamplayRoundBasedRules::RoundRespawn(void)" (?RoundRespawn@CTeamplayRoundBasedRules@@MAEXXZ) sdk_gamerules.obj Server LNK2001: unresolved external symbol "protected: virtual void __thiscall CTeamplayRoundBasedRules::CleanUpMap(void)" (?CleanUpMap@CTeamplayRoundBasedRules@@MAEXXZ) sdk_gamerules.obj Server LNK2019: unresolved external symbol "protected: virtual void __thiscall CTeamplayRoundBasedRules::Think(void)" (?Think@CTeamplayRoundBasedRules@@MAEXXZ) referenced in function "public: virtual void __thiscall CSDKGameRules::Think(void)" (?Think@CSDKGameRules@@UAEXXZ) sdk_gamerules.obj Server Last edited by beonard6: 02-27-2012 at 09:23 AM. |
|
|
|
|
|
#2 |
![]() Join Date: Jul 2008
Reputation: 1
Posts: 151
|
you need to include teamplayroundbased_gamerules.cpp in your project.
|
|
|
|
|
|
#3 |
![]() Join Date: Aug 2010
Reputation: 7
Posts: 28
|
k, another problem. no log errors,
but entities, such as func_rotationg, no longer working. also, something weird happening with poin_viewcontrol (first time - not working at all, later camera changes with gravity). also2: Assertion Failed: s_bAbsQueriesValid Last edited by beonard6: 02-28-2012 at 06:37 AM. |
|
|
|
|
|
#4 |
![]() Join Date: Sep 2009
Reputation: 0
Posts: 122
|
may i ask, how did you solve the linking problem?
it'd be of great help to me ![]() thanks! Fredrikli Edit: might seem like i ignored phy_command's post, but all files are included in my project ![]() edit2: oh, guess it wasn't included... but now i only have one error: Code:
1>teamplayroundbased_gamerules.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CTeamTrainWatcher::TimerMayExpire(void)" (?TimerMayExpire@CTeamTrainWatcher@@QAE_NXZ) referenced in function "public: virtual bool __thiscall CTeamplayRoundBasedRules::TimerMayExpire(void)" (?TimerMayExpire@CTeamplayRoundBasedRules@@UAE_NXZ) 1>.\Release_sdk/Server.dll : fatal error LNK1120: 1 unresolved externals Last edited by Fredrikli: 03-04-2012 at 12:29 PM. |
|
|
|
|
|
#5 |
![]() Join Date: Aug 2010
Reputation: 7
Posts: 28
|
@Fredrikli
ver.1/ add team_train_watcher.h and team_train_watcher.cpp to project ver.2/ Code:
bool CTeamplayRoundBasedRules::TimerMayExpire( void )
{
#ifdef TF2_DLL
// team_train_watchers can also prevent timer expiring ( overtime )
CTeamTrainWatcher *pWatcher = dynamic_cast<CTeamTrainWatcher*>( gEntList.FindEntityByClassname( NULL, "team_train_watcher" ) );
while ( pWatcher )
{
if ( !pWatcher->TimerMayExpire() )
{
return false;
}
pWatcher = dynamic_cast<CTeamTrainWatcher*>( gEntList.FindEntityByClassname( pWatcher, "team_train_watcher" ) );
}
return BaseClass::TimerMayExpire();
#endif
return false;
}
|
|
|
|
|
|
#6 |
![]() Join Date: Sep 2009
Reputation: 0
Posts: 122
|
Alright: now it compiles fine, but hl2.exe crashes when loading a map.. this is what the debugger says:
Code:
CreateEvent: event 'teamplay_map_time_remaining' not registered. The thread 'Win32 Thread' (0x1564) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x1318) has exited with code 0 (0x0). The thread 'Win32 Thread' (0xa3c) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x1658) has exited with code 0 (0x0). First-chance exception at 0x0fad569f in hl2.exe: 0xC0000005: Access violation reading location 0x00000004. Unhandled exception at 0x77cc15de in hl2.exe: 0xC0000005: Access violation reading location 0x00000004. First-chance exception at 0x77cb016e in hl2.exe: 0x00000000: Åtgärden har ♥♥♥♥förts. Unhandled exception at 0x77cc15de in hl2.exe: 0x00000000: Åtgärden har ♥♥♥♥förts. these error messages is pretty much jibberish to me.. has anyone else run into this problem? |
|
|
|
|
|
#7 | |
![]() Join Date: Sep 2009
Reputation: 0
Posts: 122
|
sorry for reviving this, but i've got problems.
I've done exactly as beonard6 has done, and the code compiles fine. Problem is as i said that the game crashes when i load a map (during "loading resources"). I read this on VDC: Quote:
All the DLLs gets copied and placed in the correct directory, both the Client.dll and the Server.dll. I've also tried debugging but it does not give me any good hints. How do you install the Constructor code into an initialisation function? and also, which constructor code? Thanks in advance ![]() Edit: Code:
---- Host_NewGame ---- Network: IP 85.230.176.244, mode MP, dedicated No, ports 27015 SV / 27005 CL Spawn Server: Asylum SOLID_VPHYSICS static prop with no vphysics model! (models/lostcoast/props_monastery/monastery_window001b.mdl) SOLID_VPHYSICS static prop with no vphysics model! (models/lostcoast/props_monastery/monastery_window001b.mdl) SOLID_VPHYSICS static prop with no vphysics model! (models/lostcoast/props_monastery/monastery_window001b.mdl) SOLID_VPHYSICS static prop with no vphysics model! (models/lostcoast/props_monastery/monastery_window001b.mdl) SOLID_VPHYSICS static prop with no vphysics model! (models/lostcoast/props_monastery/monastery_window001b.mdl) SOLID_VPHYSICS static prop with no vphysics model! (models/props_foliage/ivy_01.mdl) exec: couldn't exec skill1.cfg ConVarRef sk_suitcharger doesn't point to an existing ConVar Executing listen server config file CreateEvent: event 'teamplay_map_time_remaining' not registered. Set Gravity 800.0 (0.250 tolerance) PrecacheScriptSound 'NPC_CombineS.ElectrocuteScream' failed, no such sound script entry PrecacheScriptSound 'npc_citizen.die' failed, no such sound script entry First-chance exception at 0x76ebb9bc in hl2.exe: Microsoft C++ exception: Grid::CFs::CEndOfFileException at memory location 0x0018c560.. First-chance exception at 0x76ebb9bc in hl2.exe: Microsoft C++ exception: Grid::CFs::CEndOfFileException at memory location 0x0018c4b0.. First-chance exception at 0x76ebb9bc in hl2.exe: Microsoft C++ exception: Grid::CFs::CEndOfFileException at memory location 0x0018c568.. First-chance exception at 0x76ebb9bc in hl2.exe: Microsoft C++ exception: Grid::CFs::CEndOfFileException at memory location 0x0018c4b8.. PrecacheScriptSound 'Hud.Hint' failed, no such sound script entry player\edgar.mdl : material "models/player/edgar/german_body" not found. player\edgar.mdl : material "models/player/edgar/red_body" not found. player\edgar.mdl : material "models/player/edgar/red_gear" not found. "materials/.vtf": can't be found on disk PrecacheScriptSound 'Default.Zoom' failed, no such sound script entry PrecacheScriptSound 'WeaponFrag.Roll' failed, no such sound script entry Attempted to create unknown entity type teamplay_map_time_remaining! Can't init teamplay_map_time_remaining Created class baseline: 15 classes, 2371 bytes. 32 player server started 'hl2.exe': Loaded 'C:\Program Files (x86)\Steam\crashhandler.dll' 'hl2.exe': Loaded 'C:\Windows\SysWOW64\dhcpcsvc.dll' 'hl2.exe': Loaded 'C:\Windows\SysWOW64\netapi32.dll' 'hl2.exe': Loaded 'C:\Windows\SysWOW64\netutils.dll' 'hl2.exe': Loaded 'C:\Windows\SysWOW64\srvcli.dll' 'hl2.exe': Loaded 'C:\Windows\SysWOW64\wkscli.dll' 'hl2.exe': Unloaded 'C:\Windows\SysWOW64\netapi32.dll' 'hl2.exe': Unloaded 'C:\Windows\SysWOW64\wkscli.dll' 'hl2.exe': Unloaded 'C:\Windows\SysWOW64\srvcli.dll' 'hl2.exe': Unloaded 'C:\Windows\SysWOW64\netutils.dll' CHTTPRequestCache took 114 milliseconds to initialize The thread 'CHTTPCacheInitializeThread' (0x14e0) has exited with code 0 (0x0). gameserver.cpp (112) : Assertion Failed: m_unAppIdServed != k_uAppIdInvalid hl2.exe has triggered a breakpoint First-chance exception at 0x76ebb9bc in hl2.exe: Microsoft C++ exception: `anonymous namespace'::CRequestInProgressException at memory location 0x254dfc60.. First-chance exception at 0x76ebb9bc in hl2.exe: Microsoft C++ exception: common::CConnResetException at memory location 0x1e76fb78.. First-chance exception at 0x76ebb9bc in hl2.exe: Microsoft C++ exception: `anonymous namespace'::CRequestInProgressException at memory location 0x254dfc60.. gameserver.cpp (735) : Assertion Failed: m_CMInterface.GetLogonState() == k_ELogonStateNotLoggedOn hl2.exe has triggered a breakpoint First-chance exception at 0x76ebb9bc in hl2.exe: Microsoft C++ exception: `anonymous namespace'::CRequestInProgressException at memory location 0x254dfc60.. First-chance exception at 0x76ebb9bc in hl2.exe: Microsoft C++ exception: `anonymous namespace'::CRequestInProgressException at memory location 0x254dfc60.. exec: couldn't exec listenserver.cfg First-chance exception at 0x76ebb9bc in hl2.exe: Microsoft C++ exception: `anonymous namespace'::CRequestInProgressException at memory location 0x0018e368.. First-chance exception at 0x76ebb9bc in hl2.exe: Microsoft C++ exception: `anonymous namespace'::CRequestInProgressException at memory location 0x0018e368.. First-chance exception at 0x76ebb9bc in hl2.exe: Microsoft C++ exception: `anonymous namespace'::CRequestInProgressException at memory location 0x0018e368.. Node Graph out of Date. Rebuilding... First-chance exception at 0x76ebb9bc in hl2.exe: Microsoft C++ exception: `anonymous namespace'::CRequestInProgressException at memory location 0x254dfc60.. The thread 'Win32 Thread' (0xe0c) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x16cc) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x1320) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x16ac) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x608) has exited with code 0 (0x0). The thread 'Win32 Thread' (0xdb0) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x16c8) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x17ac) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x1038) has exited with code 0 (0x0). First-chance exception at 0x76ebb9bc in hl2.exe: Microsoft C++ exception: `anonymous namespace'::CRequestInProgressException at memory location 0x254dfc60.. First-chance exception at 0x76ebb9bc in hl2.exe: Microsoft C++ exception: `anonymous namespace'::CRequestInProgressException at memory location 0x254dfc60.. The thread 'Win32 Thread' (0x111c) has exited with code 0 (0x0). First-chance exception at 0x1013569f in hl2.exe: 0xC0000005: Access violation reading location 0x00000004. Unhandled exception at 0x779515de in hl2.exe: 0xC0000005: Access violation reading location 0x00000004. First-chance exception at 0x7794016e in hl2.exe: 0x00000000: Åtgärden har ♥♥♥♥förts. Unhandled exception at 0x779515de in hl2.exe: 0x00000000: Åtgärden har ♥♥♥♥förts. First-chance exception at 0x7794016e in hl2.exe: 0x00000000: Åtgärden har ♥♥♥♥förts. Unhandled exception at 0x779515de in hl2.exe: 0x00000000: Åtgärden har ♥♥♥♥förts. The thread 'Win32 Thread' (0x858) has exited with code 0 (0x0). First-chance exception at 0x7794016e in hl2.exe: 0x00000000: Åtgärden har ♥♥♥♥förts. Unhandled exception at 0x779515de in hl2.exe: 0x00000000: Åtgärden har ♥♥♥♥förts. First-chance exception at 0x7794016e in hl2.exe: 0x00000000: Åtgärden har ♥♥♥♥förts. Unhandled exception at 0x779515de in hl2.exe: 0x00000000: Åtgärden har ♥♥♥♥förts. The program '[3620] hl2.exe: Native' has exited with code 0 (0x0). Last edited by Fredrikli: 03-12-2012 at 07:45 AM. |
|
|
|
|
|
|
#9 |
![]() Join Date: Sep 2009
Reputation: 0
Posts: 122
|
neither can i :O
SDK Template mod :P guess it's sdk07
|
|
|
|
|
|
#11 |
![]() Join Date: Sep 2009
Reputation: 0
Posts: 122
|
thanks
|
|
|
|
|
|
#12 |
![]() Join Date: Aug 2010
Reputation: 7
Posts: 28
|
meh. seems easiest way is make own round based gamerule.
|
|
|
|
|
|
#13 | |
![]() Join Date: Aug 2010
Reputation: 7
Posts: 28
|
fix: put func_rotating to the list of entities that will not be recreated on new rounds
Quote:
my own fail. tried to teleport entity while its spawning Last edited by beonard6: 04-08-2012 at 05:27 AM. |
|
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|