Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / is there a reason my program exits?

Author
Message
Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 16th Jun 2004 18:38 Edited at: 2nd Jul 2004 05:13
[edit] figured out! see eleventh post...


okay i'm working on this game for the acoders compo and i've run into a problem...when i go from my main menu to my game(by using the "newgame" button i set up) it exits without playing my game!(okay what i have so far of my game...)

i checked to see if there are any subs without "returns" but there aren't!

so i'm wondering if anybody knows of any reasons a program might exit "un-called-for"

here's my code if it helps any...



Formerly known as "DarkWing Duck"
Vues3d on Kalimee
21
Years of Service
User Offline
Joined: 12th May 2004
Location: NYON (SWITZERLAND)
Posted: 16th Jun 2004 18:53
As for now I hadn't the time to read all the code, but try to put the gosubs BEFORE the functions...

Guido
http://www.vues3d.com
JerBil
21
Years of Service
User Offline
Joined: 8th May 2004
Location: Somewhere along the Z axis...
Posted: 16th Jun 2004 19:00
An obvious problem is goto game in your newgame sub, but that should give an error.

-JerBil
Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 16th Jun 2004 19:02 Edited at: 16th Jun 2004 19:05
Thanks!

@Vues3d on Kalimee -
that's the way it was before i switched it in a atempt to fix it

here it is anyway though(it didn't work)

@JerBil -
i got rid of the goto game becuase i don't need it(i don't use either the load game or the new game subs...at the moment)...and it's a bad programming habit(i only put it there for trouble shooting...)


Formerly known as "DarkWing Duck"
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 16th Jun 2004 19:19
Is it my tired old yaks or do you have no '\' slashes in your loaders for some reason?


Van-B


The nature of Monkey was irrepressible!.
Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 16th Jun 2004 20:04
that's not my fault that's becuase when i post it it gets rid of them...


Formerly known as "DarkWing Duck"
Yyrd
21
Years of Service
User Offline
Joined: 29th Mar 2004
Location: Under some bridge
Posted: 17th Jun 2004 00:20
once thing i did wrong when i made menus, was i changes the res rez. make sure you dont change any screen res while there are obejcts loaded.
Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 17th Jun 2004 19:49
okay thanks!...i didn't do that...


Formerly known as "DarkWing Duck"
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 17th Jun 2004 21:51 Edited at: 17th Jun 2004 21:55
This looks very suspicious to me. It says, if mouse clicking then END program if not clicking on this button. There is some conditional logic around that, but it is worth looking into.
--
TAZ

if mousex()<270 or mousex()>370 or mousey()<380 or mousey()>420
set sprite priority 1045,1
set sprite priority 1042,2
paste sprite 1042,270,380
else
set sprite priority 1042,1
set sprite priority 1045,2
paste sprite 1045,270,380
if mouseclick()=1 then end
endif

History did not begin with PONG. -- Greg Costikyan

Game Beavers
real skwirle
20
Years of Service
User Offline
Joined: 1st Jun 2004
Location: Texas
Posted: 18th Jun 2004 05:22
The kitten is crashing your game because you called her "FuFu"

Joking, of course. I had to disable all the collision functions because I don't have that, but it ran for me... got as far as moving the kitty around the playing field.

That's not much help, although makes me suspect something in the collision init.
Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 1st Jul 2004 00:56
i figured it out!(a week ago but i didn't have internet so i couldn't tell ya'll...)

the probelm was that i used the collision function
Quote: "CollisionTypePro("object id","type")"

twice on the same object and it turns out that that makes the program exit
(and it doesn't give you a error in "collision debug mode" )


Formerly known as "DarkWing Duck"
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 1st Jul 2004 05:11
Quirky, but good to know. Thanks for posting a follow up.
--
TAZ

History did not begin with PONG. -- Greg Costikyan

Game Beavers

Login to post a reply

Server time is: 2025-06-01 09:26:49
Your offset time is: 2025-06-01 09:26:49