Author |
Message |
Mattlap

|
Posted: Fri May 06, 2011 4:40 pm Post subject: It ends game when I put in this command? |
|
|
What is it you are trying to achieve?
So right now I'm really confused. Basically I'm making (or trying to at least) and this keeps happening: It asks which way you want to go (north, south, east, west) and i'm trying to iron out the wrinkles in the north direction. When you say North it says that there are two doors (one on the left and one on the right [I've completed the left side]) and when you say right, it crashes. I've isolated the problem area and I'll put it as an attachment.
Any help would be greatly appreciated.
-Matt
Please specify what version of Turing you are using
4.1.1
Description: |
|
 Download |
Filename: |
Help.t |
Filesize: |
2.18 KB |
Downloaded: |
130 Time(s) |
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Tony

|
Posted: Fri May 06, 2011 5:09 pm Post subject: RE:It ends game when I put in this command? |
|
|
in which way does it "crash" (is there an error / what does it say)?
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
mirhagk
|
Posted: Fri May 06, 2011 5:41 pm Post subject: RE:It ends game when I put in this command? |
|
|
You have misplaced the get oldman string, that would be why the program freezes, move it to after the question is asked.
|
|
|
|
|
 |
Mattlap

|
Posted: Sat May 07, 2011 10:27 am Post subject: Re: It ends game when I put in this command? |
|
|
@Tony It just says in the top bar beside what it's called - Finished even though it shouldn't be.
@mirhagk Could you please elaborate? I'm really 'noobish' when it comes to Turing.
|
|
|
|
|
 |
chrisbrown

|
Posted: Sat May 07, 2011 11:21 am Post subject: Re: It ends game when I put in this command? |
|
|
Mattlap @ Sat May 07, 2011 10:27 am wrote: It just says in the top bar beside what it's called - Finished even though it shouldn't be.
That 's not a crash, that just means according to the logic of the code you've written, it has reached the end of the program. Just for future reference.
I notice you only check for the case-sensitive Right, and not right. Could that be the problem?
You may run into the problem mirhagk mentioned, but Turing will at least provide an error message for that.
|
|
|
|
|
 |
Mattlap

|
Posted: Sat May 07, 2011 6:47 pm Post subject: Re: It ends game when I put in this command? |
|
|
Thanks chrisbrown, didn't see that at all. I feel kind of stupid right now lol.
|
|
|
|
|
 |
Tony

|
Posted: Sat May 07, 2011 6:58 pm Post subject: RE:It ends game when I put in this command? |
|
|
The "problem" will still be there for any other input though. I think I've mentioned it before -- you might want to think about more levels of abstraction.
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
chrisbrown

|
Posted: Sat May 07, 2011 8:26 pm Post subject: Re: RE:It ends game when I put in this command? |
|
|
Tony @ Sat May 07, 2011 6:58 pm wrote: you might want to think about more levels of abstraction.
QFT. These small fixes are only enabling you to dig yourself deeper into a hole.
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Mattlap

|
Posted: Sat May 07, 2011 8:28 pm Post subject: Re: It ends game when I put in this command? |
|
|
The thing is, Tony, that I did most possibilities (i.e. "Yes", "yes", "sure", etc, etc) for all of the other ones so it was just a singular error if you will.
Also, just an update (if anyone cares lol) that I'm almost done. I just need to do the west side.
-Matt
|
|
|
|
|
 |
|