hl.dll compile Error Created 9 years ago2015-08-25 11:51:24 UTC by Themaster12234 Themaster12234

Created 9 years ago2015-08-25 11:51:24 UTC by Themaster12234 Themaster12234

Posted 9 years ago2015-08-25 11:51:24 UTC Post #326826
Okay, I'm using the SDK 2.3, I add some code to make a weapon, but whe I compile I have a lot of errors. Here you have the log (sorry but is in spanish...:

[ SNIP ] - mod

I don't know much programing so I don't understand what is the problem, if someone can tell I would appreciate it
Posted 9 years ago2015-08-25 12:44:55 UTC Post #326827
I think you're going to have a hard time solving this one.
There's very little overlap in Spanish speakers and coders on this site.

Have you successfully compiled the code before you tried adding things?
Tetsu0 Tetsu0Positive Chaos
Posted 9 years ago2015-08-25 13:00:30 UTC Post #326828
I think I've had the same error eariler when using the old code (HL SDK 2.3) with VS2010 express. What I did was simply to use the code available at Valve's github, wich is the latest code used in the current Steam release of Half-Life. I recomend using that as it's updated and bugfixed and can be updated through github if a bugfix arrives, without affecting your custom code. It needs Visual Studio 2010 c++, wich I think the express version can still be downloaded from Microsoft, unless they've fulle phased it out in favort for VS2013.
Dr. Orange Dr. OrangeSource good.
Posted 9 years ago2015-08-25 13:11:52 UTC Post #326829
Yep, I had the problem after... I'll try the code in valve's githb...

Thx for the help :D :D
Posted 9 years ago2015-08-25 13:27:46 UTC Post #326830
Im mean before.... (Dat english)
Posted 9 years ago2015-08-26 00:30:03 UTC Post #326833
okay, I still have the same f*** problem. This is the compile of the client.dll with the valve's github code:

[ SNIP ] - mod
Posted 9 years ago2015-08-26 00:48:47 UTC Post #326837
Hide the warnings and post the errors only, the errors are the important things you need to look at, and the HL code has hundreds of warnings that you can safely ignore. I'll remove your previous logs because they're making the page really long, use something like pastebin to post log files please :)
Penguinboy PenguinboyHaha, I died again!
Posted 9 years ago2015-08-26 12:49:42 UTC Post #326840
Okay, sorry, I had a bug how do a lot of spam here, I'll try to find the errors...
Posted 9 years ago2015-08-26 14:05:59 UTC Post #326842
Posted 9 years ago2015-08-26 23:54:20 UTC Post #326846
Okay, looks like you have some syntax errors in your 'beretta.cpp' file, but I think there are other problems as well. It's hard to tell without seeing the code. You should try to find a more detailed tutorial to follow.

Do you have much experience with C++ programming? If you haven't done a lot of programming before you are going to have a lot of difficulty making changes to the SDK, you might need to find someone else who can help you with coding new weapons.
Penguinboy PenguinboyHaha, I died again!
Posted 9 years ago2015-08-27 01:44:35 UTC Post #326847
No, I don't have much experience, i do a few tutorials but it doesn't help me... I need someone how can teach me. I'm 15 years old and in my country, I need to have 18 to learn programing in a university career...
thx for the help, i'll try to find the errors and I'll fix them if i can.
Posted 9 years ago2015-08-27 02:36:28 UTC Post #326848
If you post the code in your beretta.cpp file, I might be able to locate some the errors. But I would recommend you learn how to do object-oriented C++ first, because the SDK code uses it a lot. You need to learn more about C++ programming if you want to make progress.

There is a good introduction here: http://www.cplusplus.com/doc/tutorial/
You should read them all (and also write simple some code yourself so you can experience it yourself), but if you want to skip some, the most important sections you should read are:
  • Basics: "Variables and types" and "Operators"
  • Program structure: "Control Structures" and "Functions"
  • Compound data types: "Arrays" and "Pointers"
  • Classes: Everything
Penguinboy PenguinboyHaha, I died again!
Posted 9 years ago2015-08-27 12:01:57 UTC Post #326850
Oh thx you a lot (sorry if I writte bad), I'll do all of the tutorial, and here you have the file:
http://pastebin.com/gsRF2bqH
Posted 9 years ago2015-08-27 12:17:45 UTC Post #326851
It's really hard to tell without seeing what other changes you've made, I can't see any obvious problems in that file, but there's missing components (from other files) so I can't be sure.

My recommendation would be to start again from an unmodified copy, then make very small changes one at a time, and compile after every change. That makes it a lot easier to know what change was wrong so you can investigate and find the problem.

Start by adding the weapon class because that's the first step (e.g. you can't add the gun to the HUD until you have finished the gun). A lot of the time it's easier to copy the code from another weapon to start with, you might want to copy the code from the handgun to use as a starting point.
Penguinboy PenguinboyHaha, I died again!
Posted 9 years ago2015-08-27 16:24:57 UTC Post #326853
looks like you compiled without finishing the tutorial. Please finish ALL of the weapon creating tutorial before compiling. Took me a while to make a simple weapon copy work but it's worth it when you see it in game

Your beretta.cpp looks incomplete and is missing functions like primaryfire. As penguinboy said, its better to copy hl_weapon_glock.cpp into beretta.cpp and start from there, rather than start from a blank file.
Posted 9 years ago2015-08-28 01:39:30 UTC Post #326856
Okay, I'll do that. I downloaded again the source code and i compile it without coding. In the build of client.dll i have this error:
http://pastebin.com/0aMRbPcu

It's say something about a custom build with game_control.lib
You must be logged in to post a response.