No, the problem isn't a bug in the 2.3 SDK, if it shows one of your hud
items, what possible bug would cause it not to run other ones that are
correctly coded? Doesn't make sense, ergo it's just your code.
My experience with hud elements is its generally always caused by a silly
little mistake i've made (i spent 4 hours working out that i did a =
instead of an == once :P). BTW, great trick for that -- write the test the
other way around, your code won't compile anymore... (e.g. don't do if (x
== 1), do if (1 == x), forget an equals sign and the compiler will stop you).
If you're having trouble debugging, i suggest you resolve that first and
foremost. www.thewavelength.net in the old site area, there's info on
setting up to debug your .dlls.
It sounds as if your init function isn't getting called at all. Step
through the init code in CHud, and when you get to this line:
m_Scouter.Init(); //<---My new hud piece
press F11 rather than F10, and you'll go into your function.
Or, copy your new scouter thingy's files elsewhere, and start over. Do an
empty shell for everything, then just have vidinit and draw do minimal
things, like draw one of the halflife sprites, once you've succeeded there,
put your stuff back in slowly.
Could just be the rect is whacked or the sprite itself. Double check that
you added lines to the hud.txt at the top, or you'll pull your hair out for
hours for nothing.
At 03:57 PM 10/22/2002 -0700, you wrote:
>Make sure you have added a member variable for your new hud element to CHud
>and call Init() in CHud::Init() and VidInit() in CHud:VidInit();
Yup done that.
>If that is done, make sure that it is not your drawing code. Comment out
>anything that might turn it off (or whatever you have that turns it on and
>then turn it on in VidInit(). Does it display now? Then it is your
>communication code that is broken.
Nope still doesn't display, and it can't be the communication code because
none of that
is involved with activating/displaying the hud anymore because i moved it to
vidinit
>Put a breakpoint in Init() and VidInit(). Are they getting called? Walk
>through VidInit() and make sure the sprite is getting loaded (just because
>it works elsewhere, doesn't mean you don't have an invisible typo here ;) )
>
>If it is getting loaded, put a breakpoint in the Draw and walk through
>it. Are the x and y coords right? (might be drawn off screen) Are you
>getting to the actual drawing code? Is the size of your rectangle that you
>pass into the draw valid? Is the sprite NULL?
I can't seem to get it to run in the debugger
I set my debugging executable as hl.exe in my sierra/halflife folder
but It has no debugging symbols and when i try to go into mod viewer and
load
up my mod, it only finds 3 mods that I have to click refresh list to find
and wont even
let me activate those. I even tried specifying my program arguments to load
my mod directly
and It loads up the splash and all, but when you try to create a game, It
simply tries to create
a halflife game instead. I dunno I really believe theirs something buggy
with this sucker because,
I even through in a real quick failing assert in my new hud's init that
would guarantee to fail,
and it Didn't ..... I mean, It's not even calling the function.
And I dunno about anyone else but,
--hud.cpp--
..
m_flTime = 1.0;
m_Ammo.Init();
m_Health.Init();
m_Scouter.Init(); //<---My new hud piece
..
--End of hud.cpp--
It should at least call my init function, (it does call init, vidinit, and
display for my health hud just not my scouter)
Now, I'm using the new sdk 2.3, and I already heard their was one bug in it,
would this be another possible one ?
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders