Is it possible that you made some other changes to the code besides this? The code shouldn't ever try to reference "None" as a label-- that is just a value that is entered by default to make sure the player can't go through the schedule without picking an activity. If you look at the month label, you can see I have set "None" as the default value for each week.
Code: Select all
label month:
$ month_cnt += 1
scene bg default
#Setting default values for the schedule
$ week01 = None
$ week02 = None
$ week03 = None
$ week04 = None
$ show_date = False
Code: Select all
label schedule_repeat:
call screen schedule
if week01 is None or week02 is None or week03 is None or week04 is None:
"Please pick an activity for every week this month."
jump schedule_repeat
In any case, I would check to make sure that the schedule_repeat label is still there, and is in the correct location. It should be right after the month label.
I also tested the base code, without removing anything, to check to see if maybe a Ren'Py update made some changes-- but it worked fine. I went ahead and removed the codex and inventory completely on my end, making sure the code still worked. These are the parts you have to remove in order to keep it working:
In the script.rpy file, remove this entire section of code:
Code: Select all
init python:
class Player(renpy.store.object):
def __init__(self, name, max_hp=0, max_mp=0, element=None):
self.name=name
self.max_hp=max_hp
self.hp=max_hp
self.max_mp=max_mp
self.mp=max_mp
self.element=element
player = Player("Derp", 100, 50)
class Item(store.object):
def __init__(self, name, player=None, hp=0, mp=0, element="", image="", cost=0):
self.name = name
self.player=player # which character can use this item?
self.hp = hp # does this item restore hp?
self.mp = mp # does this item restore mp?
self.element=element # does this item change elemental damage?
self.image=image # image file to use for this item
self.cost=cost # how much does it cost in shops?
def use(self): #here we define what should happen when we use the item
if self.hp>0: #healing item
player.hp = player.hp+self.hp
if player.hp > player.max_hp: # can't heal beyond max HP
player.hp = player.max_hp
inventory.drop(self) # consumable item - drop after use
elif self.mp>0: #mp restore item
player.mp = player.mp+self.mp
if player.mp > player.max_mp: # can't increase MP beyond max MP
player.mp = player.max_mp
inventory.drop(self) # consumable item - drop after use
else:
player.element=self.element #item to change elemental damage; we don't drop it, since it's not a consumable item
class Inventory(store.object):
def __init__(self, money=10):
self.money = money
self.items = []
def add(self, item): # a simple method that adds an item; we could also add conditions here (like check if there is space in the inventory)
self.items.append(item)
def drop(self, item):
self.items.remove(item)
def buy(self, item):
if self.money >= item.cost:
self.items.append(item)
self.money -= item.cost
player = Player("Derp", 100, 50)
player.hp = 50
player.mp = 10
chocolate = Item("Chocolate", hp=40, image="gui/inv_chocolate.png")
banana = Item("Banana", mp=20, image="gui/inv_banana.png")
gun = Item("Gun", element="bullets", image="gui/inv_gun.png", cost=7)
laser = Item("Laser Gun", element="laser", image="gui/inv_laser.png")
inventory = Inventory()
#add items to the initial inventory:
inventory.add(chocolate)
inventory.add(chocolate)
inventory.add(chocolate)
inventory.add(chocolate)
inventory.add(banana)
inventory.add(banana)
inventory.add(banana)
inventory.add(banana)
inventory.add(gun)
inventory.add(laser)
Code: Select all
##############################################################################
# Main Menu
#
# Screen that's used to display the main menu, when Ren'Py first starts
# http://www.renpy.org/doc/html/screen_special.html#main-menu
screen main_menu:
# This ensures that any other menu screen is replaced.
tag menu
# The background of the main menu.
window:
style "mm_root"
# The main menu buttons.
frame:
style_group "mm"
xalign .98
yalign .98
has vbox
textbutton _("Start Game") action Start()
[b] textbutton _("Codex") action ShowMenu("codex")[/b]
textbutton _("CG Gallery") action ShowMenu("cg_gallery")
textbutton _("BG Gallery") action ShowMenu("bg_gallery")
textbutton _("Load Game") action ShowMenu("load")
textbutton _("Preferences") action ShowMenu("preferences")
textbutton _("Help") action Help()
textbutton _("Quit") action Quit(confirm=False)
init -2 python:
# Make all the main menu buttons be the same size.
style.mm_button.size_group = "mm"
Code: Select all
##############################################################################
# Game Menu
#
# Screen that appears when the player presses the escape button.
image logo = "logo.jpg"
screen game_menu:
tag menu
add "logo"
frame:
xalign .5
yalign .33
has vbox spacing 5
textbutton _("Continue") action Return()
textbutton _("Save Game") action ShowMenu("save")
textbutton _("Load Game") action ShowMenu("load")
[b] textbutton _("Codex") action ShowMenu("codex")[/b]
textbutton _("Preferences") action ShowMenu("preferences")
textbutton _("Main Menu") action MainMenu()
textbutton _("Help") action Help()
textbutton _("Quit") action Quit()
Code: Select all
screen home:
tag menu2
frame:
style_group "home"
xalign 1.0
yalign 0.8
grid 4 2:
transpose False
textbutton "Stats" action Show("stats")
textbutton "Talk" action Show("talk")
textbutton "Diet" action Show("diet")
textbutton "Info" action Show("info")
textbutton "Town" action Show("town")
textbutton "Castle" action Show("castle")
[b] textbutton "Items" action Show("inventory_screen")[/b]
textbutton "Save" action ShowMenu("save")
frame:
style_group "home2"
xalign 1.0
yalign 1.0
vbox:
textbutton "Schedule" action Jump("month")
init python:
#This controls minimum button length
style.home = Style(style.frame)
style.home_button.xmaximum = 100
style.home_button.xminimum = 100
style.home_button.yminimum = 100
style.home_button.ymaximum = 100
init python:
#This controls minimum button length
style.home2 = Style(style.frame)
style.home2_button.xmaximum = 400
style.home2_button.xminimum = 400
style.home2_button.yminimum = 100
style.home2_button.ymaximum = 100
Code: Select all
#ITEMS
screen items:
tag menu
frame:
style_group "items"
xalign 0.3
yalign 0.3
vbox:
textbutton "Remove Weapon"
textbutton "Remove Armor"
textbutton "Cancel" action Hide("menu")
init python:
#This controls minimum button length
style.items_button.xminimum = 20
style.items_label.xalign = .5
Code: Select all
#BLANK
screen blank:
tag menu
frame:
style_group "blank"
xalign 0.3
yalign 0.3
vbox:
textbutton "Palace Guard"
textbutton "Royal Knight"
textbutton "General"
textbutton "Minister of State"
textbutton "Archbishop"
textbutton "Royal Concubine"
textbutton "Queen"
textbutton "King"
textbutton "Jester"
textbutton "Cancel" action Hide("menu")
init python:
#This controls minimum button length
style.castle_button.xminimum = 220
style.castle_label.xalign = .5