PDA

View Full Version : Simple Coding Problem (Probably)


JL`
06-28-2007, 09:12 AM
Hey i'm new to these forums.. and i can see myself being here quite a lot so hello to you all!

Basically.. i've got everything setup and i can run the mod. It's for HL2 Single Player and i've started this tutorial: (As i'm new :P)

http://www.kaosnyrb.co.uk/2.html

But my bullets don't seem to be getting any slower.. or any faster! So i probably didn't compile correctly.

I made sure of this by following this next tutorial:

http://www.kaosnyrb.co.uk/3.html

I tryed changing the bolt to a milk carton but when i run the mod it doesn't come up as a milk carton it's still a bolt.

I'm using V C++ Express Edition.. does anyone have any ideas please? If someone could tell me the correct way to build/debug/compile that would be great..

Thank you.

Marine
06-28-2007, 09:27 AM
When you load up your mod open the console and copy/paste it all here.

JL`
06-28-2007, 10:26 AM
Is that from running it from V C++?

I get this

CSoundEmitterSystem: Registered 5138 sounds
scripts\talker\npc_barney.txt(token 15) : Multiple definitions for criteria 'IsMap_d3_c17_09'
CResponseSystem: scripts\talker\response_rules.txt (217 rules, 213 criteria, and 208 responses)
maxplayers set to 1
Heap: 256.00 Mb
Parsed 23 text messages
execing config.cfg
cc_lang =
Sound Initialization
Set primary sound buffer format: yes
Using secondary sound buffer
2 channel(s)
16 bits/sample
44100 samples/sec
DirectSound initialized
Sound sampling rate: 44100
1 CPU, Frequency: 2.4 Ghz, Features: GenuineIntel SSE SSE2 MMX RDTSC CMOV FCMOV
execing valve.rc

Thank you.

JL`
06-28-2007, 10:27 AM
By the way.. i don't know if this will make a difference to the problem or not. But i have not got any content added to the mod yet.. all i've done is made a tiny map for testing purposes and made a weapon entity so i can pick up the crossbow to test it. Would that make any difference at all?

Cheers,

Penumbra
06-28-2007, 05:23 PM
The code you've just posted is the start up messages from the engine. ;) And everything seems to be fine there. So there are no errors found during start up.

When you compile with Visual C++, do you see at the end of the compile output that two files where copied to another destination?

Just to make sure:
Retrieve the project properties of one of the projects (server_hl2 or client_hl2): right click on on of the projects and select properties.
In 'Configuration Properties', go to 'Custom Build Setup' and make sure it has the proper input:

For Command Line:
if exist "<steamdir>\steamapps\SourceMods\<yourmod>\bin\client.dll" attrib -r ""<steamdir>\steamapps\SourceMods\<yourmod>\bin\client.dll"
copy "$(TargetDir)"client.dll ""<steamdir>\steamapps\SourceMods\<yourmod>\bin"
and for Outputs:
"<steamdir>\steamapps\SourceMods\<yourmod>\bin\client.dll
So <steamdir> and <yourmod> should be replaced with your own names and paths!

This is for the client side, so check it also for the server project.

To make it clearer, this copies the dll's from the projects to the right directories so it can be used for the game.
Hopes this helps! :cool:

JL`
06-29-2007, 02:11 AM
Thanks for the reply..

I seem to be missing the BIN folder in the "MyMod" directory which contains the server.dll and the client.dll.

I take it that's the problem :O Does anyone know how i would go about obtaining these? I obviously done something wrong because when i was setting up the mod it said i should have these two files in the BIN folder..

Cheers,

Penumbra
06-29-2007, 02:57 AM
I think that you can create this folder in the proper directory.
Try that out and see if your game runs and does the things it want you to do (shoot milk cartons ;) ).

If not, I would suggest you create a new mod, since I think something went wrong during the installation...

Let me know

=UKLP=SoulRider
06-30-2007, 03:45 PM
The reason you are missing these files is because your compile did not complete succesfully. When it completes succesfully, these folders are automatically created.

if at the bottom of your compile you get:

========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Then both were created succesfully. More likely you are getting:
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

Marine
06-30-2007, 05:55 PM
Have you renamed your MOD folder? If so, go into SourceMods, go into the mod folder it was named originally and copy the DLL's out.

JL`
07-14-2007, 11:14 AM
The reason you are missing these files is because your compile did not complete succesfully. When it completes succesfully, these folders are automatically created.

if at the bottom of your compile you get:

========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Then both were created succesfully. More likely you are getting:
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

Thanks everyone for your help.. sorry i haven't been around much i have been working away quite a lot lately.

In reply to your answer.. i do get the 2 failed information at the bottom after it has compiled.. so how do i resolve this? I've followed so many tutorials to try and get it right.. i'm using Visual C++ Express Edition to compile. Maybe i'm missing something out.

Thanks a lot,

Jamie

Penumbra
07-15-2007, 03:26 AM
OK, what are your compile errors? Only then we can solve the problem!

JL`
07-15-2007, 06:52 AM
Right i found out the compiling problem.. i seem to have missed a step.

Now it copies the files to the bin folder ok. The problem i'm getting now is i'm trying to reduce the speed of the crossbow bolts.. i changed it to 500 in the server_hl2 file called "weapon_crossbow.cpp" or something similar.. but when i click on the green button to run it - it will run but the crossbow bolts don't seem to be any slower.. is there something i'm doing wrong?

Thanks,

Jamie.

Iced_Eagle
07-17-2007, 05:49 PM
Right i found out the compiling problem.. i seem to have missed a step.

Now it copies the files to the bin folder ok. The problem i'm getting now is i'm trying to reduce the speed of the crossbow bolts.. i changed it to 500 in the server_hl2 file called "weapon_crossbow.cpp" or something similar.. but when i click on the green button to run it - it will run but the crossbow bolts don't seem to be any slower.. is there something i'm doing wrong?

Thanks,

Jamie.

Are you recompiling at all between changes? It's possible you could still be using the old DLL's.

JL`
07-22-2007, 12:59 PM
Nope, i started a completed new mod.

Anyone have any ideas please? :(

JL`
07-29-2007, 06:44 AM
Does anyone please have any ideas at all? I don't have a clue what's wrong :(

Apologize for the double post.