Page 1 of 1

Unexpected EOF While Parsing [solved]

Posted: Mon Feb 04, 2019 10:47 pm
by ArizaLuca
I'm trying to make a confirm screen to continue the game; so I have this code:

Code: Select all

call screen confirm(message="Choosing this option will mean you will not be able to continue exploring. Continue anyway?", yes_action=jump alister_fireplace, no_action=jump alister_1_search)
When I try to run this line of code, this error occurs:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/Alister.rpy", line 224, in script
    call screen confirm(message="Choosing this option will mean you will not be able to continue exploring. Continue anyway?", yes_action=jump alister_fireplace, no_action=jump alister_1_search)
  File "renpy/common/000statements.rpy", line 514, in execute_call_screen
    args, kwargs = a.evaluate()
SyntaxError: unexpected EOF while parsing (Alister.rpy, line 224)

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/Alister.rpy", line 224, in script
    call screen confirm(message="Choosing this option will mean you will not be able to continue exploring. Continue anyway?", yes_action=jump alister_fireplace, no_action=jump alister_1_search)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/ast.py", line 1861, in execute
    self.call("execute")
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/ast.py", line 1849, in call
    return renpy.statements.call(method, parsed, *args, **kwargs)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/statements.py", line 203, in call
    return method(parsed, *args, **kwargs)
  File "renpy/common/000statements.rpy", line 514, in execute_call_screen
    args, kwargs = a.evaluate()
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/ast.py", line 184, in evaluate
    kwargs[k] = renpy.python.py_eval(v, locals=scope)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/python.py", line 1942, in py_eval
    code = py_compile(code, 'eval')
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/python.py", line 674, in py_compile
    raise e
SyntaxError: unexpected EOF while parsing (Alister.rpy, line 224)

Darwin-18.0.0-x86_64-i386-64bit
Ren'Py 7.1.3.1092
DollGame 1.0
Mon Feb  4 21:45:18 2019
Any help?

Re: Unexpected EOF While Parsing

Posted: Mon Feb 04, 2019 10:52 pm
by Imperf3kt
Check your file for any errant "

EOF means end of file, and is most likely caused by one too many or too few "

This link might help.
https://www.codecademy.com/en/forum_que ... da610009b5

Re: Unexpected EOF While Parsing

Posted: Tue Feb 05, 2019 6:32 am
by IrinaLazareva
yes_action and no_action are screen actions() not control flow.

https://renpy.org/doc/html/screen_actio ... ol-actions

so

Code: Select all

    call screen confirm(message="Choosing this option will mean you will not be able to continue exploring. Continue anyway?", 
        yes_action=Jump('alister_fireplace'), 
        no_action=Jump('alister_1_search')
        )

Re: Unexpected EOF While Parsing

Posted: Tue Feb 05, 2019 9:49 am
by ArizaLuca
Thank you very much!

Re: Unexpected EOF While Parsing [solved]

Posted: Sun May 02, 2021 12:57 am
by Bum_McFluff
So then what does this mean? It was working, but now is not. Nothing had changed with this part of the coding since the last successful playthrough.

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 11, in script call
    call hotel_01_scene
  File "game/scripts/locations/hotel/hotel_01.rpy", line 34, in script
    z "Hi. You look lost."
SyntaxError: unexpected EOF while parsing (<none>, line 1)

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 11, in script call
    call hotel_01_scene
  File "game/scripts/locations/hotel/hotel_01.rpy", line 34, in script
    z "Hi. You look lost."
  File "renpy/ast.py", line 715, in execute
    renpy.exports.say(who, what, *args, **kwargs)
  File "renpy/exports.py", line 1393, in say
    who(what, *args, **kwargs)
  File "renpy/character.py", line 1176, in __call__
    who = renpy.python.py_eval(who)
  File "renpy/python.py", line 2247, in py_eval
    code = py_compile(code, 'eval')
  File "renpy/python.py", line 835, in py_compile
    raise e
SyntaxError: unexpected EOF while parsing (<none>, line 1)

Windows-10-10.0.19041
Ren'Py 7.4.4.1439
Trainer Aftermath 1.0.1
Sun May  2 14:52:55 2021

Re: Unexpected EOF While Parsing [solved]

Posted: Sun May 02, 2021 3:45 pm
by IrinaLazareva
Bum_McFluff wrote:
Sun May 02, 2021 12:57 am
So then what does this mean? It was working, but now is not. Nothing had changed with this part of the coding since the last successful playthrough.

Code: Select all

  File "game/script.rpy", line 11, in script call
    call hotel_01_scene
  File "game/scripts/locations/hotel/hotel_01.rpy", line 34, in script
    z "Hi. You look lost."
SyntaxError: unexpected EOF while parsing (<none>, line 1)
Well, hard to say without code.
Maybe the problem is born somewhere in the area of hotel_01_scene's label...

Re: Unexpected EOF While Parsing [solved]

Posted: Sun May 02, 2021 9:10 pm
by Bum_McFluff
No, I found it. It was simply an extra space when I defined the character. My own fault.