qirien wrote: ↑Fri Jan 26, 2018 5:14 pm
verysunshine, your problem was that you defined everything twice, once in newscript.rpy and once days_script.rpy. So that was making it confused. I deleted one of them and then it did not crash on that screen.
Where is the correct place to define the variables? I removed them in day_script and moved all of the variables above the start label. The error still pops up.
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/days_script.rpy", line 28, in script
call screen display_planner (["Morning", "Afternoon", "Evening"])
File "renpy/common/000statements.rpy", line 485, in execute_call_screen
store._return = renpy.call_screen(name, *args, **kwargs)
File "game/dse-day_planner.rpy", line 58, in execute
screen display_planner(periods):
File "game/dse-day_planner.rpy", line 58, in execute
screen display_planner(periods):
File "game/dse-day_planner.rpy", line 59, in execute
frame:
File "game/dse-day_planner.rpy", line 61, in execute
vbox:
File "game/dse-day_planner.rpy", line 63, in execute
hbox:
File "game/dse-day_planner.rpy", line 65, in execute
for p in periods:
File "game/dse-day_planner.rpy", line 66, in execute
vbox:
File "game/dse-day_planner.rpy", line 74, in execute
vbox:
File "game/dse-day_planner.rpy", line 76, in execute
for name, curr_val, enable, should_show in this_period.acts:
File "game/dse-day_planner.rpy", line 77, in execute
$ show_this = eval(should_show)
File "game/dse-day_planner.rpy", line 77, in <module>
$ show_this = eval(should_show)
SyntaxError: invalid syntax (<none>, line 1)
Windows-8-6.2.9200
Ren'Py 6.99.14.3135
No Good Wife Redux Basic
Here's everything before the game's first display.
Code: Select all
init python:
config.automatic_images = [ '_' ]
## Characters
define f = Character('Farris', kind=adv, color="#b3b4f6")
define v = Character('Virgil', kind=adv, color="#99c27b", show_two_window= False)
define e = Character('Esther', kind=adv, color="#FFFFFF", show_two_window= False)
define en = Character('', what_prefix="\"", what_suffix="\"", what_color="#FFFFFF")
define m = Character('Mother', kind=adv, color="#f6dfb3")
define a = Character('Anne Brown', kind=adv, color="#f6b3f6")
define h = Character('Mr. Hughes', kind=adv, color="#b3f6de")
define s = Character('Shopkeeper', kind=adv, color="#f6b3b3")
#This code defines the variables that will be used in the rest of the game.
init python:
register_stat("Wedding Preparedness", "prep", 10, 100)
register_stat("Charisma", "charisma", 10, 100)
register_stat("Intelligence", "intelligence", 10, 100)
register_stat("Handiness", "handiness", 10, 100)
register_stat("Physicality", "physicality", 10, 100)
register_stat("Relaxation", "relaxation", hidden=True)
dp_period("Morning", "morning_act")
dp_choice("Work Early", "work")
dp_choice("Talk to Mother", "tmother")
dp_period("Afternoon", "afternoon_act")
dp_choice("Shop", "shop")
dp_choice("Visit Farris", "tfarris", show ="fnightinvite= False")
dp_choice("Visit Virgil", "tvirgil")
dp_choice("Visit Anne", "tanne")
dp_period("Evening", "evening_act")
dp_choice("Talk to Mother", "tmother")
dp_choice("Sew", "sew")
dp_choice("Read", "read")
dp_choice("Visit Farris", "tfarris_eve", show ="fnightinvite= True")
$ money = 30
# The game starts here.
label start:
## Time to define variables!
define day = 0
define fnightinvite = False
scene black
Possible issues:
- Tabbing from hell
- $ or define for variables
- Two init python sections back to back