0

I had launched my programm, but it gave me a traceback that says: "line 9: is not terminated with newline". I don't see a mistake. Can someone explain it to me?

init:

    #Название мода

    $ mods["test_mod"]=u"Саманта: Reworked"
    
    #Персонажи
    
    $ sm = Character (u'Саманта', color = "0000ff", ctc = "ctc_animation", ctc_position = "fixed", "what_color = "ffdd7f", drop_shadow = [ (2, 2) ], drop_shadow_color = "#000", what_drop_shadow = [ (2, 2) ], what_drop_shadow_color = "#000")
    
    #Изображения
    
    image nk1W = "mods/S_Reworked/cg/331470_16.jpg"
    

1 Answer 1

0

Seems like you just made a typo on one of the args on the line where you define the Character sm. "what_color should probably be what_color.

Debuggers can't always find the root cause of a problem correctly. In this case, the typo means Ren'Py sees "what_color = " as a string, which causes it to read the rest of the line completely wrong, and it can't find the closing parenthesis at the end.

File "game/script.rpy", line 9: is not terminated with a newline. (Check strings and parenthesis.)
    $ sm = Character (u'Саманта', color = "0000ff", ctc = "ctc_animation", ctc_position = "fixed", "what_color = "ffdd7f", drop_shadow = [ (2, 2) ], drop_shadow_color = "

For future reference, it's a lot easier to find errors in long function calls like this if you break them up onto multiple lines after each comma, like so:

$ sm = Character (
    u'Саманта', 
    color = "0000ff", 
    ctc = "ctc_animation", 
    ctc_position = "fixed", 
    "what_color = "ffdd7f", # Ren'Py will now identify this line as the problem
    drop_shadow = [ (2, 2) ], 
    drop_shadow_color = "#000", 
    what_drop_shadow = [ (2, 2) ], 
    what_drop_shadow_color = "#000"
)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.