0 registered members (),
1,459
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
How to get list of functions, that run at the moment
#275434
07/01/09 11:02
07/01/09 11:02
|
Joined: Aug 2004
Posts: 1,345 Kyiv, Ukraine
VeT
OP
Serious User
|
OP
Serious User
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
|
On the debug panel i see, that there are 18 functions running I press mouse, call HighlightAvaivablePath() function, then i call another function that consists of
void PlayerActivate() { for first to last node { turn move } beep }
So, player starts moving(i see 19 funtions), pass all path, function beeps and ends(probably), but there are still 19 functions on debug panel
In addition, when i select player again, i get "crash in HighlightAvaivablePath()" that called before PlayerActivate(), BUT if i place breakpoint before them and run it with F10, i see that it crashes at the first line of PlayerActivate()
How to debug this?
|
|
|
Re: How to get list of functions, that run at the moment
[Re: VeT]
#275476
07/01/09 13:07
07/01/09 13:07
|
Joined: Aug 2004
Posts: 1,345 Kyiv, Ukraine
VeT
OP
Serious User
|
OP
Serious User
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
|
Also, the number of functions increased, but i heard beeping, it means that function dont work anymore... i'll look through other functions, but list of all functions, that run would really helps me.
|
|
|
Re: How to get list of functions, that run at the moment
[Re: VeT]
#275497
07/01/09 14:35
07/01/09 14:35
|
Joined: Aug 2004
Posts: 1,345 Kyiv, Ukraine
VeT
OP
Serious User
|
OP
Serious User
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
|
Okay, i had found, where problem was.
void PlayerActivate()
{
for first to last node
{
turn
move
}
beep
}
when i commented "turn" section of PlayerActivate() function, there is no more "crash in HighlightAvaivablePath()"... very nice btw, "turn" section by itself:
vec_to_angle(temp_vec,vec_diff(NULL,ActiveChar.x,AstarPlayerClosestTarget.x));
diff = ang(ActiveChar.pan - temp_vec.x);
while ( abs(diff) > 15 )
{
vec_to_angle(temp_vec,vec_diff(NULL,ActiveChar.x,AstarPlayerClosestTarget.x));
diff = ang(ActiveChar.pan - temp_vec.x);
ActiveChar.pan -= sign(diff)*50*time_step;
HighlightPath(steps);
wait(1);
}
Last edited by VeT; 07/01/09 14:36.
|
|
|
Re: How to get list of functions, that run at the moment
[Re: VeT]
#277468
07/09/09 11:18
07/09/09 11:18
|
Joined: Aug 2004
Posts: 1,345 Kyiv, Ukraine
VeT
OP
Serious User
|
OP
Serious User
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
|
btw, at least i found soultion It was because of the correct is But why i got "crash in HighlightAvaivablePath()", i dont know
|
|
|
Re: How to get list of functions, that run at the moment
[Re: VeT]
#277476
07/09/09 11:51
07/09/09 11:51
|
Joined: Dec 2008
Posts: 528 Wagga, Australia
the_mehmaster
User
|
User
Joined: Dec 2008
Posts: 528
Wagga, Australia
|
I had the same issue with the fluid demo i posted: made mouse3d() function crash, but worked. Took me ages to find out that VECTOR* is a pointer and VECTOR actually exists. If i had found this thread earlier i could have helped you..
|
|
|
|