Computer Science Canada i need help!please fix my battleship game!!!i dont know what to do!! |
Author: | mhar_0525 [ Thu Nov 08, 2007 9:00 am ] | ||
Post subject: | i need help!please fix my battleship game!!!i dont know what to do!! | ||
Edited by Clayton: CODE TAGS!!!! |
Author: | Dan [ Thu Nov 08, 2007 9:11 am ] |
Post subject: | RE:i need help!please fix my battleship game!!!i dont know what to do!! |
Well the first thing worng with it that i see is that you have a procedure in another procedure. You can not have procedures in procedures in turing. 2ndly you seem to have a producure called Main_Menu warped around everything, this is not needed in turing and you do not even call it out side of it's self any way so it whould never be ran even if it did work. If you simple remove the Main_Menu procudure and the call to it, the code at least seems to run (tho it stops at the images for me since i do not have them). P.S. It seems odd to me that you could make so much code yet cleary have none of it work. I hope you are not copying off some one. |
Author: | mhar_0525 [ Thu Nov 08, 2007 9:49 am ] |
Post subject: | RE:i need help!please fix my battleship game!!!i dont know what to do!! |
i base it on the examples!i'm just new in turing! thats why i cant figure it out!! if i remove the main_menu then it will not work!! |
Author: | Zampano [ Thu Nov 08, 2007 9:55 am ] |
Post subject: | Re: i need help!please fix my battleship game!!!i dont know what to do!! |
What Dan meant was to end the Main_Menu procedure before moving into the actual game When I did that and took care of the extra 'end Main-Menu', the program worked until the pictures appeared, like Dan said. |
Author: | Dan [ Thu Nov 08, 2007 10:01 am ] |
Post subject: | Re: i need help!please fix my battleship game!!!i dont know what to do!! |
Zampano @ 8th November 2007, 9:55 am wrote: What Dan meant was to end the Main_Menu procedure before moving into the actual game
When I did that and took care of the extra 'end Main-Menu', the program worked until the pictures appeared, like Dan said. Well you can either restrucer Main_Menu or just remove it and it's call as it is just warped around the hole code. @mhar_0525, it may be a bit advenced to jump right from knowing nothing about turing to using images. I sugest you read up about turing in the turing walk threw we have here at: http://compsci.ca/v3/viewtopic.php?t=8808 and make shure you understand each turotial and step. As for your code, the easyest way to get it working is to remove the procedure Main_Menu(start:int) line, the end Main_Menu line where it ends the process and the call to it at Main_Menu(start). If you are geting an error at the pic line, either you named your files worng, put them in the wrong place or you realy did steal most of this code and in witch case i could not help even if i whonted to. |
Author: | Tony [ Thu Nov 08, 2007 2:15 pm ] |
Post subject: | RE:i need help!please fix my battleship game!!!i dont know what to do!! |
Most of this code is, very obviously, not original. mhar_0525 -- even if you didn't copy it from someone in your class, it's easy to tell that you have copied parts from somewhere. Be prepared to explain "your" code, else the fact that it runs will have little meaning |
Author: | Clayton [ Thu Nov 08, 2007 2:28 pm ] |
Post subject: | RE:i need help!please fix my battleship game!!!i dont know what to do!! |
Click! |
Author: | Clayton [ Thu Nov 08, 2007 11:52 pm ] |
Post subject: | Re: i need help!please fix my battleship game!!!i dont know what to do!! |
Also note that if that code ever could run, it would suffer from a stack overflow error every single time because you keep calling Main_Menu within main menu, with no exit condition. Just something else to put out there. |
Author: | mhar_0525 [ Fri Nov 09, 2007 9:55 am ] |
Post subject: | Re: i need help!please fix my battleship game!!!i dont know what to do!! |
yeah it works! tnx a lot |