Page 1 of 1

[Help] invaild syntax, I don't know what's wrong

Posted: Sun May 12, 2019 3:47 am
by smrehd
init python:
def ending(truth):
global<goodending>
global<badending>

if truth >=0:
renpy.jump(goodending)
else:
renpy.jump(badending)
return
ren'py says green lines are invaild, I'm not sure what's wrong...

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/script.rpy", line 42: invalid syntax
global<"goodending">:
^

Re: [Help] invaild syntax, I don't know what's wrong

Posted: Sun May 12, 2019 4:28 am
by SONTSE

Code: Select all

init python:
    def ending(truth):
        global goodending
        global badending
        if truth >=0:
            renpy.jump(goodending)
        else:
            renpy.jump(badending)
        return
you don't need angle brackets to declare global vars in python