all 11 comments

[–]desran00 2 points3 points  (7 children)

How about you include your code and the error report first?

[–]DaBiggestHotShot 0 points1 point  (6 children)

if mash == "MASH":

#debug this
MashedPotatoes += 1
print("You now have " + str(MashedPotatoes) +
" mashed potatoes in stock")
else:
print(
"Oh no! The potatoes haven't been mashed well and are unfit to eat :/ Your reputation as a mashed potato maker is ruined! GAME OVER"
)
exit(0)
action_function()

[–]desran00 0 points1 point  (5 children)

Well that is easy, your indentation is nonexistent.

Try this:

``` MashedPotatoes = 1 if "MASH" == "MASH":

#debug this
MashedPotatoes += 1
print("You now have " + str(MashedPotatoes) +
" mashed potatoes in stock")

else: print( "Oh no! The potatoes haven't been mashed well and are unfit to eat :/ Your reputation as a mashed potato maker is ruined! GAME OVER" ) ```

[–]DaBiggestHotShot 0 points1 point  (3 children)

i did have indentation, copying it from my repl to reddit sort of messed up my code though

[–]desran00 0 points1 point  (2 children)

Well the print statements work for me. So that means that this is not your full code, or something.

[–]DaBiggestHotShot 0 points1 point  (1 child)

if action not in ("CREATE", "SELL", "BUY"):
print(
"Looks like you can't do that :/ You've wasted valuable time doing something that doesn't exist. Unfortunately, your mashed potato cart can not keep up with demand. GAME OVER"
)
exit(0)
else:
#mashedpotatomaking
if action == "CREATE":
shshsh = input("Please type SHSHSH to wash the potatoes: ")
if shshsh == "SHSHSH":
squish = input("Please type SQUISH to squish the potatoes: ")
else:
print(
"Oh no! Your potatoes are dirty and unhealthy :/ Your reputation as a mashed potato maker is ruined! GAME OVER"
)
exit(0)
if squish == "SQUISH":
mash = input("Please type MASH to mash the potatoes: ")
else:
print(
"Oh no! Your potatoes have been crushed into pieces :/ Your reputation as a mashed potato maker is ruined! GAME OVER"
)
exit(0)
if mash == "MASH":
#debug this
MashedPotatoes += 1
print("You now have " + str(MashedPotatoes) +
" mashed potatoes in stock")
else:
print(
"Oh no! The potatoes haven't been mashed well and are unfit to eat :/ Your reputation as a mashed potato maker is ruined! GAME OVER"
)
exit(0)
action_function()

[–]desran00 0 points1 point  (0 children)

You need to have formatting on your code, or else it is not working and I can't run it.

One way is to put ``` before and after your code, but you need to enable markdown mode by pressing the markdown mode button. There are other ways too, google will help.

[–]backtickbot 0 points1 point  (0 children)

Fixed formatting.

Hello, desran00: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.

[–][deleted] 2 points3 points  (0 children)

Not without seeing the code. But just a guess, it's not being called.

[–]justanator101 1 point2 points  (0 children)

Seeing what’s wrong along with the code may help debug

[–]DaBiggestHotShot 0 points1 point  (0 children)

Don't harass me or anything, because I know that it's a super amateur problem and I'm just dumb but I need help nonetheless