Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 quit #51
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
evildaddy911




PostPosted: Sat Feb 18, 2012 12:21 pm   Post subject: quit #51

What is it you are trying to achieve?
a top down shooter


What is the problem you are having?
every time i run the program, it will run for a few seconds then crash, highlighting line 80 and saying "Quit #51"


Describe what you have tried to solve this problem
I have no idea what Quit #51 means, or how to fix it


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>

Turing:


<Add your code here>



Please specify what version of Turing you are using

open



shooter.t
 Description:

Download
 Filename:  shooter.t
 Filesize:  4.55 KB
 Downloaded:  60 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Aange10




PostPosted: Sat Feb 18, 2012 12:34 pm   Post subject: RE:quit #51

Cant help you without the M class
evildaddy911




PostPosted: Sat Feb 18, 2012 12:40 pm   Post subject: Re: quit #51

right, sorry
You'll probably need the text files too

here it is:



weapons.txt
 Description:

Download
 Filename:  weapons.txt
 Filesize:  165 Bytes
 Downloaded:  69 Time(s)


enemydata.txt
 Description:

Download
 Filename:  enemydata.txt
 Filesize:  60 Bytes
 Downloaded:  62 Time(s)


M.tu
 Description:

Download
 Filename:  M.tu
 Filesize:  729 Bytes
 Downloaded:  65 Time(s)

Aange10




PostPosted: Sat Feb 18, 2012 1:24 pm   Post subject: RE:quit #51

From toying with it a bit, my best guess is the numbers are getting too big. At some points, the Distance forumla is computing the square root of 175 million, and that number just gets bigger in the DistancePointLine function (looking at the sourcecode).

I'm not sure what Quit #51 means, but it probably has to do with the number being too big.

Is there a reason why the y2 of the line needs to extend past the MAXY of the screen? Sometimes it's even reaching -8,000.

Why not just make the line to the end of the screen?

Posted Image, might have been reduced in size. Click Image to view fullscreen.

(Here is my little bit of debugging, I haven't read the rest of the code.)



TempHElp.rar
 Description:

Download
 Filename:  TempHElp.rar
 Filesize:  2.14 KB
 Downloaded:  47 Time(s)

Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: