The Partridge Family were neither partridges nor a family. Discuss.
-
rhn94
- Posts: 5
- Joined: July 20th, 2012, 6:22 pm
Post
by rhn94 » August 1st, 2012, 3:22 pm
So i am almost halfway through the lesson and am at the part(1:19:46) where chili writes this piece of code to put down X in the grid
Code: Select all
if (kbd.EnterIsPressed() )
{
SetSquareState( cursorX, cursorY, X);
}
For some reason when i run the program after this and press enter to place a X, it does not appear and after i move the cursor the X appears at that coordinate to where i moved it to. And the first 2 rows can't be filled with Xs. Can someone please help?
i have attached my code.
-
Attachments
-
- TicTacToe-rhn.zip
- (35.63 KiB) Downloaded 150 times
-
XxWalKaxX
- Posts: 244
- Joined: June 11th, 2012, 7:15 pm
Post
by XxWalKaxX » August 1st, 2012, 3:37 pm
in your compose frame you had the following
Code: Select all
if( kbd.DownIsPressed() )
{
SetSquareState(cursorX,cursorY,X );
}
You should change it EnterIsPressed() )
What you call a bug...I call a new feature!
-
rhn94
- Posts: 5
- Joined: July 20th, 2012, 6:22 pm
Post
by rhn94 » August 1st, 2012, 3:45 pm
Derp. Thanks
-
Asimov
- Posts: 814
- Joined: May 19th, 2012, 11:38 pm
Post
by Asimov » August 2nd, 2012, 4:03 am
Hi,
There should be a disclaimer at the end of the video.
"Everything in the tutorial works, so if it doesn't you have typed it wrong" LOL
Asimov
-
XxWalKaxX
- Posts: 244
- Joined: June 11th, 2012, 7:15 pm
Post
by XxWalKaxX » August 4th, 2012, 6:56 am
well i dont know bout everybody else but i make mistakes like that all the time, but in programmin, a simple mistake is catastrophic haha
What you call a bug...I call a new feature!
-
chili
- Site Admin
- Posts: 3948
- Joined: December 31st, 2011, 4:53 pm
- Location: Japan
-
Contact:
Post
by chili » August 4th, 2012, 10:04 am
Mistakes are inevitable. The only thing that tweaks my neuticles is when they say "I did everthing exactly like chili and it doesn't work". FORK! IN THE EYE!
Chili
-
EdadTace
- Posts: 32
- Joined: April 22nd, 2012, 10:28 am
Post
by EdadTace » August 4th, 2012, 11:37 am
the other day i posted a problem I had with some code from a book - it was written exactly like in the book - exactly - but it wouldn't compile and I just couldn't figure it out
after getting an answer and then finally getting further into the book i then realize it wasn't suppose to be compiled yet lol