Figure this one out!!!!

Started by
5 comments, last by DisKordCoder 22 years, 6 months ago
Ive now got to a point in my software from which i can''t continue. I have a variable called a_Frame. This variable does not move a bit, i can''t add to it, take away from it, it accepts no interaction. If i replace this variable with another NO MATTER what the name, they dont work. I removed the initialisation of the variable (long int a_Frame) and the software debugger continues without an error even though my software is still using the variable, but its not been set up. If i try to place a breakpoint on the line which adds 1 to it (a_Frame ++ it wont let it go on that line, ive tried other ways of adding 1 to it (a_Frame += 1; a_Frame = a_Frame + 1 but no luck. This is really getting on my nerve''s, i use MS Dev Studio as my compiler, has anybody had this problem before?? I NEED HELP!! Thanks.
Advertisement
Try a complete rebuild. If that doesn''t work, remake the project. I''ve had problems similar to this with MSVC, but not exactly the same thing.

[Resist Windows XP''s Invasive Production Activation Technology!]
yeah.. ive had this problem with MSVC++ 6 as well.
i added a TON of code to a project once, then rebuilt it.. and none of my changes showed up.. just to test a theory i commented out a whole code block (that would''ve rendered the project useless), and it compiled no problem.. (still no changes though).
i ended up having to start a new project and import all my files into the new one.
talk about annoying.


-eldee
;another space monkey;
-eldee;another space monkey;[ Forced Evolution Studios ]
I know it''s a pain, but I use "Rebuild All" when I make these kinds of changes because sometimes the incremental build doesn''t detect the changes for reason.

Paradigm Shift 2000
"I am Locutus of Borg. Resistance is Futile." -- Locutus of Borg
The rebuild it all idea is good... probably the best. But I am assuming your program is overflowing with lines of code, and I am also assuming you organized your code very well.

Redo everything that has something to do with a_Frame only, not the whole application.

So, if function one adds to a_Frame, do it over, function two sets another variable, not a_frame, to zero when it is greater than 10, so leave it alone. Ya know?


"He who fights with monsters should look to it that he himself does not become a monster... when you gaze long into the abyss, the abyss also gazes into you..."~Friedrich Nietzsche
------------------------------Put THAT in your smoke and pipe it
I didn''t mean rewrite the code, just recompile the whole thing with the "rebuild all" menu thingy.
Sounds to me that your variable is getting optimized out. Even though you may be incrementing the variable or something, if you''ve got the optimizer at a high level, and the optimizer realizes that variables isn''t really doing anything, then you wouldn''t be able to set a breakpoint at that line of code.
It''s happened to me before (though not using MSVC, rather on anoher IDE)

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

This topic is closed to new replies.

Advertisement