SyntaxError ([none], line 1) in DSE 4 eval calculations
Posted: Sun Jan 21, 2018 5:58 pm
I already asked Qirian about this, and they also don't know what's going wrong.
The following SyntaxError appears when the schedule screen is called.
I have done quite a bit of digging and testing to try to isolate the problem. I have isolated the problematic line to "$ show_this = eval(should_show)" and "$ enable = eval(enable)". They share the same issue, as there does not appear to be any information on what to calculate. In the demo game, which works, there also doesn't appear to be any information on what should_show actually does.
Any help is greatly appreciated!
The following SyntaxError appears when the schedule screen is called.
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/days_script.rpy", line 42, in script
call screen day_planner(["Morning", "Afternoon", "Evening"])
File "renpy/common/000statements.rpy", line 471, in execute_call_screen
store._return = renpy.call_screen(name, *args, **kwargs)
File "game/dse-day_planner.rpy", line 50, in execute
screen day_planner(periods):
File "game/dse-day_planner.rpy", line 50, in execute
screen day_planner(periods):
File "game/dse-day_planner.rpy", line 53, in execute
frame:
File "game/dse-day_planner.rpy", line 56, in execute
use display_planner(periods)
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)
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/days_script.rpy", line 42, in script
call screen day_planner(["Morning", "Afternoon", "Evening"])
File "REDACTED_DIRECTORY\renpy-6.99.12.4-sdk\renpy\ast.py", line 1706, in execute
self.call("execute")
File "REDACTED_DIRECTORY\renpy-6.99.12.4-sdk\renpy\ast.py", line 1724, in call
return renpy.statements.call(method, parsed, *args, **kwargs)
File "REDACTED_DIRECTORY\renpy-6.99.12.4-sdk\renpy\statements.py", line 145, in call
return method(parsed, *args, **kwargs)
File "renpy/common/000statements.rpy", line 471, in execute_call_screen
store._return = renpy.call_screen(name, *args, **kwargs)
File "REDACTED_DIRECTORY\renpy-6.99.12.4-sdk\renpy\exports.py", line 2526, in call_screen
rv = renpy.ui.interact(mouse="screen", type="screen", roll_forward=roll_forward)
File "REDACTED_DIRECTORY\renpy-6.99.12.4-sdk\renpy\ui.py", line 285, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "REDACTED_DIRECTORY\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2538, in interact
scene_lists.replace_transient()
File "REDACTED_DIRECTORY\renpy-6.99.12.4-sdk\renpy\display\core.py", line 822, in replace_transient
self.remove(layer, tag)
File "REDACTED_DIRECTORY\renpy-6.99.12.4-sdk\renpy\display\core.py", line 1107, in remove
self.hide_or_replace(layer, remove_index, "hide")
File "REDACTED_DIRECTORY\renpy-6.99.12.4-sdk\renpy\display\core.py", line 1031, in hide_or_replace
d = oldsle.displayable._hide(now - st, now - at, prefix)
File "REDACTED_DIRECTORY\renpy-6.99.12.4-sdk\renpy\display\screen.py", line 443, in _hide
self.update()
File "REDACTED_DIRECTORY\renpy-6.99.12.4-sdk\renpy\display\screen.py", line 578, in update
self.screen.function(**self.scope)
File "game/dse-day_planner.rpy", line 50, in execute
screen day_planner(periods):
File "game/dse-day_planner.rpy", line 50, in execute
screen day_planner(periods):
File "game/dse-day_planner.rpy", line 53, in execute
frame:
File "game/dse-day_planner.rpy", line 56, in execute
use display_planner(periods)
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)
File "REDACTED_DIRECTORY\renpy-6.99.12.4-sdk\renpy\python.py", line 1748, in py_eval
code = py_compile(code, 'eval')
File "REDACTED_DIRECTORY\renpy-6.99.12.4-sdk\renpy\python.py", line 584, in py_compile
raise e
SyntaxError: invalid syntax (<none>, line 1)
Windows-8-6.2.9200
Ren'Py 6.99.12.4.2187
Code: Select all
vbox:
style "dp_choice_vbox"
for name, curr_val, enable, should_show in this_period.acts:
$ show_this = should_show # returns the same as show_this = True, should calculate if events should appear or not
#$ show_this = eval(should_show) #ERROR BEGINS WITH THIS LINE
$ enable = eval(enable)
$ selected = (selected_choice == curr_val)
if show_this:
if enable:
textbutton name action SetField(store, this_period.var, curr_val)
else:
textbutton name
if show_this and enable and selected:
$ valid_choice = True
if not valid_choice:
$ can_continue = False