Difference between revisions of "Fixing first time HL2DM compile problems"

From Valve Developer Community
Jump to: navigation, search
(Created page with "==The Error== If this is the first time you compiled a HL2DM project you may get an error that looks like this: <pre>Build: 1 succeeded, 1 failed, 0 up-to-date 0, skipped</pre>...")
 
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{otherlang2
 +
|ru=Fixing_first_time_HL2DM_compile_problems:ru
 +
}}
 +
 
==The Error==
 
==The Error==
  
Line 25: Line 29:
 
<syntaxhighlight lang="cpp">return OnTakeDamage_Alive( info );</syntaxhighlight>
 
<syntaxhighlight lang="cpp">return OnTakeDamage_Alive( info );</syntaxhighlight>
  
 
So to fix this, hit Ctrl+F and type the first code block in, then press "Quick Replace" and type in the second code block and then press "Replace All"
 
  
 
This will correct all the errors throughout the project.
 
This will correct all the errors throughout the project.
Line 37: Line 39:
  
 
This may be to-do with this fix or not, but the side effect  I get is the game window minimises and maximises rapidly, and to stop it, you need to Start+D out of it once it is assumed the menu loads up, then click back on the "Moddnamehere" in the stat bar to get it back up.
 
This may be to-do with this fix or not, but the side effect  I get is the game window minimises and maximises rapidly, and to stop it, you need to Start+D out of it once it is assumed the menu loads up, then click back on the "Moddnamehere" in the stat bar to get it back up.
 +
 +
If your mod fails you in any aspects, follow this https://developer.valvesoftware.com/wiki/Compiling_under_VS2008#Fix_grenade_tripmine.cpp
  
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]
[[Category:Programing]]
+
[[Category:Programming]]
 
[[Category:Help]]
 
[[Category:Help]]

Latest revision as of 11:33, 12 May 2013

Русский

The Error

If this is the first time you compiled a HL2DM project you may get an error that looks like this:

Build: 1 succeeded, 1 failed, 0 up-to-date 0, skipped

And somewhere in the output log, you will may or may-not have something something similar to this:

2>grenade_tripmine.cpp
2>.\hl2mp\grenade_tripmine.cpp(276) : error C2039: 'OnTakeDamage_Alive' : is not a member of 'CBaseGrenade'
2>        c:\moddir\src\game\shared\basegrenade_shared.h(34) : see declaration of 'CBaseGrenade'

This is not your fault, it is a code error!


The Fix

The problem is to do with this small code block being defined wrongly:

return BaseClass::OnTakeDamage_Alive( info );

It should actually look like this:

return OnTakeDamage_Alive( info );


This will correct all the errors throughout the project.

Then hit build solution, and you will have your mod up and running!


Notes

This may be to-do with this fix or not, but the side effect I get is the game window minimises and maximises rapidly, and to stop it, you need to Start+D out of it once it is assumed the menu loads up, then click back on the "Moddnamehere" in the stat bar to get it back up.

If your mod fails you in any aspects, follow this https://developer.valvesoftware.com/wiki/Compiling_under_VS2008#Fix_grenade_tripmine.cpp