|
2 registered members (3run, AndrewAMD),
623
guests, and 1
spider. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
How to find an error ?
#296262
10/30/09 16:15
10/30/09 16:15
|
Joined: Feb 2009
Posts: 3,207 Germany, Magdeburg
Rei_Ayanami
OP
Expert
|
OP
Expert
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
|
Hey  I added some new functions to my script some days ago - not only one function! Now, i tried an older thing - the engines just crashes and shutdown - it think there must be a wait(1); missing somewhere. How to find something like this in a 15.000 line code? Thanks, Rei
|
|
|
Re: How to find an error ?
[Re: Rei_Ayanami]
#296331
10/30/09 23:24
10/30/09 23:24
|
Joined: Oct 2002
Posts: 2,256 Oz
Locoweed
Expert
|
Expert
Joined: Oct 2002
Posts: 2,256
Oz
|
First make sure you have -diag set on in game command line (Options-Preferences-Engine in SED), then look at acklog.txt that will be created each time you run game and see what the error was that caused crash and go from there.
Usually from there you can narrow things down.
Professional A8.30 Spoils of War - East Coast Games
|
|
|
Re: How to find an error ?
[Re: Rei_Ayanami]
#296566
11/01/09 19:15
11/01/09 19:15
|
Joined: May 2009
Posts: 445 Peine, Germany
Razoron
Senior Member
|
Senior Member
Joined: May 2009
Posts: 445
Peine, Germany
|
Setz in jede Funktion einen error() am Anfang und am Ende. Dann weißt du welche Funktion aufgerufen wurde, und wo dann der error drinn war. Den Rest kannste dann mit Breakpoints debuggen.
Last edited by Razoron; 11/01/09 19:16.
|
|
|
Re: How to find an error ?
[Re: Razoron]
#297759
11/09/09 18:01
11/09/09 18:01
|
Joined: Feb 2009
Posts: 3,207 Germany, Magdeburg
Rei_Ayanami
OP
Expert
|
OP
Expert
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
|
if finally found the problem - but what the heck is the problem???
if(roket != NULL)
{
if(vec_to_screen(roket, camera) == NULL) roket = NULL;
return;
}
In this code(it got called in every frame):
function mouse_search()
{
VECTOR temp4;
if((mouse_ent != NULL)&&(mouse_ent != player)) roket = mouse_ent;
if(roket != NULL)
{
if(vec_to_screen(roket, camera) == NULL) roket = NULL;
return;
}
if(roket != NULL)
{
if(roket.skill50 == 1)
{
vec_set(temp4, roket.x);
if(vec_to_screen(temp4, camera)!= NULL)
{
roket_pan.pos_x = temp4.x;
roket_pan.pos_y = temp4.y;
set(roket_pan, SHOW);
}
}
}
}
Last edited by Rei_Ayanami; 11/09/09 18:02.
|
|
|
Re: How to find an error ?
[Re: Rei_Ayanami]
#297761
11/09/09 18:17
11/09/09 18:17
|
Joined: May 2008
Posts: 2,113 NRW/Germany
alibaba
Expert
|
Expert
Joined: May 2008
Posts: 2,113
NRW/Germany
|
Ich denke das liegt am vec_to_screen, weil du vec_for_screen nicht in einer if benutzen kannst, da es nur einen vector zu einer bildschirm koordiante konventiert. da kann man nicht frage: wenn(setze vector der rakete zu einer bildshirmkoordinate) == NULL) Ich hoffe du verstehst was ich meine. Btw willst du mit dem vec_to_screen prüfen ob die rakete noch sichtbar ist oder wofür hast du es eingesetzt?? EDIT : Damn Muffel was faster than i was 
Last edited by alibaba; 11/09/09 18:18.
|
|
|
|