#πŸ”’ my code refuses to run and outputs this START

32 messages Β· Page 1 of 1 (latest)

neon swallow
#

START : This command cannot be run due to the error: The system cannot find the file specified.
At line:1 char:1

  • START
  •   + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
      + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
    
    
    

here is my code

'gameON = input("Welcome to Arnamark! Type START to start!")
conversationNum = 0
route = 1
if gameON == "START":
gameON == True

if gameON == True:
conversationNum = 1

if conversationNum == 1 :
print("You find yourself at an impass in a great forest, with 2 forks in the road. ")
print("Which route do you take?")
route == input("Type 1 for a long trailing path with berries and nuts, but with no end in sight."
"Type 2 for a shorter path with a tavern at the end, but with no food or forageables.")
if you need anymore info just ask me
(this is for making a text game by the way)

meager zodiacBOT
#

@neon swallow

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

neon swallow
#

oh, i also expect it to get up to conversationNum wehere it prints everything out, put instead it gets stuck on the first input

somber gulch
#

try running it with this command python file_name_here.py

#

i don't think there's anything wrong with the code itself, it's probably the run command

#

if you're using vscode, this can happen because your python file isn't in the parent directory

neon swallow
#

woops i can check that now

#

yeah im guessing i need to move that

somber gulch
#

what does it say on the terminal

#

like what's the path

neon swallow
#

"C:/Users/myname/AppData/Local/Microsoft/WindowsApps/python3.12.exe" "c:/Users/myname/Documents/Arnamark/arnamark.py

somber gulch
#

type python c:/Users/myname/Documents/Arnamark/arnamark.py in your terminal and see if that runs it

neon swallow
#

i get error number 2, no such file or directory

#

im pretty positive i put in my username correctly because i took it out of the path because its my name

somber gulch
#

sorry i'm not too sure
perhaps something is wrong with your vscode configuration

supple moat
#

What happens if you click the run button?

neon swallow
#

i get to the part where it goes "welcome to arnamark, type start to start" then when i say start...nothing happens lol

supple moat
#

Did you press enter?

#

After typing start

#

Oh nvm

#

You're using == for assignment, on the first if

neon swallow
#

ohhh i see

supple moat
#

You want gameON= True, not gameON==True, the first one sets gameON to true, the second one checks if it's true

neon swallow
#

right here im quessing

supple moat
#

Yup

somber gulch
#

:0

#

oops i thought it just wasn't running

neon swallow
#

ah hah! thank you @supple moat

#

you too bikaty

#

!close

meager zodiacBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.