Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

This particular section in example_code.renpy

init python hide:

    import os.path

    import re

    # A list of files we will be scanning.

    files = [ ]

    for i in os.listdir(config.gamedir):

        if i.endswith(".rpy"):

            files.append(os.path.join(config.gamedir, i))

    for fn in files:

        fn = fn.replace("\\","/")

       
        f = renpy.open_file(fn)

        open_examples = set()

        for l in f:

            l = l.decode("utf-8")

            l = l.rstrip()

            m = re.match("\s*#begin (\w+)", l)

            if m:

                example = m.group(1)

                if example in examples:

                    raise Exception("Example %r is defined in two places.", example)

                open_examples.add(example)

                examples[example] = [ ]

                continue

            m = re.match("\s*#end (\w+)", l)

            if m:

                example = m.group(1)

                if example not in open_examples:

                    raise Exception("Example %r is not open.", example)

                open_examples.remove(example)

                continue

            for i in open_examples:

                examples[i].append(l)

        if open_examples:

            raise Exception("Examples %r remain open at the end of %r" % (open_examples, fn))

        f.close()

Thank you so much ! It's working now and it has really helped me understand the Documentation content on layered images. I didn't want to turn up to class on Monday without knowing how to explain layered images. 

I just changed a few lines from 570. 

for fn in files:

        fn = fn.replace("\\","/")

        f = renpy.open_file(fn)

        open_examples = set()

        for l in f:

#no more changes needed, just the above 

 

You're welcome, glad to hear that. 

This worked for me as well. Thank you so much!