Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Ran into a bug when loading existing saves:

While running game code:
  File "game/myscripts/my_time.rpy", line 3187, in script
    $ AllAvailableEvents()
  File "game/myscripts/my_time.rpy", line 3187, in <module>
    $ AllAvailableEvents()
  File "game/myscripts/my_events.rpy", line 80, in AllAvailableEvents
  File "game/myscripts/my_events.rpy", line 90, in AvailableEvents
  File "game/myscripts/my_events.rpy", line 217, in Check_Req
  File "game/myscripts/my_events.rpy", line 204, in Check_VarReq
TypeError: '>=' not supported between instances of 'NoneType' and 'int'

Not sure if ignoring is safe or if I'm going to end up with weirdness.

Lots of weirdness. It's a guess, but I think you most likely pressed ignore during a previous update and it didn't update it properly.

You can try and salvage it with the renpy console. Use:

for xxx in allcharas:

    try:

        AvailableEvents(xxx)

    except:

        print "Error on xxx.name"

(1 edit)

Had to change to sys.stdout.write to actually see the log.  Eileen is the culprit, and specifically, story_6.  If I execute the code in that function by hand, it fails at Check_Req(ev_var) in line 90 with self.story == 6.

Digging in further, the call to player_inv.qty(AliceOutfit) returns None, rather than 0 as one might reasonably expect.

I suspect the fix is as simple as

        def qty(self, item):
            for i in self.inv:
                if i[0] == item:
                    return i[1] # returns quantity
            return 0

unless there's some reason to return NoneType instead of 0 for that function.

At least that keeps the exception from happening.  I'm assuming that it will eventually get added to the inventory as expected when I do whatever thing I need to do.

Well, I guess it isn't quite that simple.  Four spots in the code are expecting None (in my_events.rpy, 01_asara.rpy, and two spots in worldmap.rpy), and should also be adjusted to check for 0.  But that's probably a better fix than trying to handle NoneType everywhere that a numeric value would normally be expected.

The game is built with renpy 7.7.0 which uses python 2, not 3. It doesn't error out when None is returned instead of int. Well, shouldn't at least.

I know it's what the error says, but there's no way that is the actual issue. It works for everyone else, in all the examples you posted.  Try using vars(e_story6) and checking the var_req and others

Ah.  I was getting load failures when running it from the 7.6.x SDK, so I jumped straight to 8.2.  (I don't run randomly downloaded RP apps as-is for paranoia reasons.)  I didn't even know they released a 7.7.  :-D

Glad you got it working. Enjoy the game.