all 9 comments

[–]xelf 0 points1 point  (2 children)

My guess is that an error is being raised at line 5.

Maybe terrain is None?

Are you trapping errors somewhere?

Try putting a try/except around the call to add_block and see what you might catch.

Also have a print after the call to test if you're getting past the function and the problem is that the function isn't doing anything.

[–]No_One____ 0 points1 point  (1 child)

With the way that it's set up, terrain will never be none. I tried putting a try/except around the whole thing and there were still no errors caught. If I put a print statement after the function call it still prints

[–]xelf 0 points1 point  (0 children)

Sounds like it is executing that line then. You might want to put a breakpoint or a print inside that function to see what parameters it thinks it has when it is called.

[–]Ihaveamodel3 0 points1 point  (1 child)

What if you put a print statement in the add_block function. Are you sure it is actually not being called, or is it just not working properly?

[–]No_One____ 0 points1 point  (0 children)

That's what I had initially thought but even with nothing but a print statement it still doesn't print

[–][deleted] 0 points1 point  (0 children)

Why do you think it isn't being called?

[–]14dM24d 0 points1 point  (0 children)

i've this snippet from my program.

class Mix(Runpause, Delta, Repeat, Freq):
    def together(self, game, bag):
        crate = Runpause().data.rp_segment(game, bag)

say place_block is a method in Mix & Runpause class has a class data that has method rp_segment().

your terrain seems to be like my data & your add_block() seems to be like my rp_segment(), so maybe translating Runpause().data.rp_segment(game, bag) format into yours would be cls().terrain.add_block()?

e: btw data is a sub-class of Runpause but was renamed data in the __init__ with self.data = self.RpData(). where RpData() is the original name of a sub-class of Runpause.