Pages: [1]
  Print  
Author Topic: Alternate to game_end  (Read 2841 times)
Offline (Male) nbeerbower
Posted on: August 18, 2008, 10:03:02 PM

Member
Location: Pennsylvania
Joined: Jun 2008
Posts: 34

View Profile Email
Can't end the game? Cause an error!

Here's the one I use.
Code: [Select]
point_distance(KITTYZ_ARE_CUTE,KITTYZ_ARE_CUTE,x,y)//cause an error
Causing an error that will end the game might not look too good but it's the best we're going to get in R3. :P

Logged
Offline (Unknown gender) Game_boy
Reply #1 Posted on: August 19, 2008, 06:34:57 AM
Member
Joined: Apr 2008
Posts: 228

View Profile
Shouldn't that have been one of the more important functions? Oh well...

point_distance(YOU,YOUR_MOM,YOUR_FACE,CHUCK_NORRIS_ROUNDHOUSE_KICK)
Logged
Offline (Female) serprex
Reply #2 Posted on: August 19, 2008, 02:09:24 PM
Smooth ER
Developer
Joined: Apr 2008
Posts: 106

View Profile WWW
Or you know, add in game_end()

First, remove char bQuit=0 in WINDOWS\WINDOWSmain.h
Then, add
Code: [Select]
char bQuit=0;int game_end(){bQuit=1;}At the top of SHELLmain.cpp
Then add int game_end() at the top of Compiler Source\fnames.txt

TADA!
Logged
Offline (Male) nbeerbower
Reply #3 Posted on: August 19, 2008, 02:21:11 PM

Member
Location: Pennsylvania
Joined: Jun 2008
Posts: 34

View Profile Email
They're all good ideas! :P
Logged
Offline (Male) Josh @ Dreamland
Reply #4 Posted on: November 29, 2008, 11:44:11 PM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2946

View Profile Email
Practically nothing errors at runtime in ENIGMA.

If you want to end the game, say:
cpp { 1/0; }

I'll mention that game_end is implemented for next release, though.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) OniLink10
Reply #5 Posted on: November 30, 2008, 08:35:27 PM
Member
Joined: Jul 2008
Posts: 68

View Profile Email
exit(0) ends the program and tells windows that there were no errors. Any other value tells Windows that there was an error.
Logged
Offline (Male) Josh @ Dreamland
Reply #6 Posted on: November 30, 2008, 10:30:09 PM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2946

View Profile Email
Ruiner of fun <_<
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) RetroX
Reply #7 Posted on: December 01, 2008, 05:03:57 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
That would work better, considering that you won't end up with Windows giving you a "would you like to report this error" message.

Although I already disabled that because it pissed me off.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Pages: [1]
  Print