Hi, Poision! The "tabs" in your editing program are actually different scripts. I'm assuming you changed stats in "dse-schedule" and added dialogue in "dse-events".
I'm not sure what you mean by "changing the () around '(store, s.var)". Your (seemingly modified) code and my (unchanged) code are identical.
Could you show us your stats code? That's probably where the issue actually is.
(You don't need to read past this point. Everything below here is debugging another problem.)
_ _ _
Meanwhile, at the SyntaxError:
_ _ _
I've done some more careful debugging by commenting out code in the affected area to see exactly where the problem is. The code operates as expected until the line "show_this = eval(should_show)" is run. Then, it puts up the syntax error.
Code: Select all
While running game code:
File "game/dse-schedule.rpy", line 93, 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 78, in execute
$ enable = eval(enable)
File "game/dse-day_planner.rpy", line 78, in <module>
$ enable = eval(enable)
SyntaxError: invalid syntax (<none>, line 1)
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/dse-schedule.rpy", line 93, in script
call screen display_planner(["Morning", "Afternoon", "Evening"])
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\ast.py", line 1801, in execute
self.call("execute")
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\ast.py", line 1789, in call
return renpy.statements.call(method, parsed, *args, **kwargs)
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\statements.py", line 169, in call
return method(parsed, *args, **kwargs)
File "renpy/common/000statements.rpy", line 485, in execute_call_screen
store._return = renpy.call_screen(name, *args, **kwargs)
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\exports.py", line 2614, in call_screen
rv = renpy.ui.interact(mouse="screen", type="screen", roll_forward=roll_forward)
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\ui.py", line 287, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2620, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2925, in interact_core
root_widget.visit_all(lambda i : i.per_interact())
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\display\core.py", line 511, in visit_all
d.visit_all(callback)
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\display\core.py", line 511, in visit_all
d.visit_all(callback)
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\display\core.py", line 511, in visit_all
d.visit_all(callback)
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\display\screen.py", line 401, in visit_all
callback(self)
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2925, in <lambda>
root_widget.visit_all(lambda i : i.per_interact())
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\display\screen.py", line 411, in per_interact
self.update()
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\display\screen.py", line 592, in update
self.screen.function(**self.scope)
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 78, in execute
$ enable = eval(enable)
File "game/dse-day_planner.rpy", line 78, in <module>
$ enable = eval(enable)
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\python.py", line 1833, in py_eval
code = py_compile(code, 'eval')
File "C:\Users\Me\Documents\renpy-6.99.12.4-sdk\renpy\python.py", line 630, in py_compile
raise e
SyntaxError: invalid syntax (<none>, line 1)
I've done a lot of reading about Python and Ren'Py trying to figure out what "show_this = eval(should_show)" means. Here's my understanding:
"show_this" should be set to the result of "should_show"
How do we evaluate "should_show"?
"should_show" is found one other time in all of the documentation. This is in the "for statement" that controls the display of the options. This use isn't instructions.
"should_show" doesn't appear in the Ren'Py documentation.
I wrote "show_this = should_show" just to see if that would cause the error to go away. It does. The resulting screen will show all of the events, ignoring the show conditions. When "Done Planning" is clicked, it will run the selected event and all events after it, even if the events are not for that period before going to the next period. "show_this = True" does the same thing, while "show_this = False" hides all of the events, as it should.
The problem appears to be that the game can't find the instructions for what it's evaluating.
Did I miss the "should_show" evaluation? I can't see a reference to it in the DSE guide either, and that works flawlessly.