Re: Dating Sim Engine (DSE) 4.0! Day Planner and Event Manager
Posted: Mon Feb 05, 2018 3:48 am
I thought the if statements had ended the last of these bugs. It did, but there's another problem.
The call for "work event" fails to load an event.
In afternoon, it crashes when trying to call any event. The crash is the syntax error "unbound method eval".
The relevant variables right before the crash (When "Afternoon" is displayed):
Pressing "ignore" allows the game to continue.
EDIT: My initial events were flawed. I missed the brackets in event.only().
However, return goes to call another event instead of going to the next period. It looks like this should be easy to fix, so I'll see what I can do. I don't want the events to always appear in a specific order, so event.depends won't work for me.
The call for "work event" fails to load an event.
Code: Select all
label work:
if check_skip_period():
jump afternoon
if weekend == True:
jump afternoon
centered "Work"
$ period = "work"
$ act = work_act
call events_run_period
# calls the work_act
$ event("atwork", "act == 'at_work'", event.solo(), priority=200)
label atwork:
"Default work event."
if day == 2 or day == 9 or day == 10:
"It's Friday, so my boss gives me my paycheque."
$ items["pounds"] += 20
return
The relevant variables right before the crash (When "Afternoon" is displayed):
- act = u'atwork'
events_executed = {u'garden': True}
period = u'work'
work_act = u'actwork'
Code: Select all
label afternoon:
# It's possible that we will be skipping the afternoon, if one
# of the events in the morning jumped to skip_next_period. If
# so, we should skip the afternoon.
if check_skip_period():
jump evening
# The rest of this is the same as for the morning.
centered "Afternoon"
$ period = "afternoon"
$ act = afternoon_act
call events_run_period
EDIT: My initial events were flawed. I missed the brackets in event.only().
However, return goes to call another event instead of going to the next period. It looks like this should be easy to fix, so I'll see what I can do. I don't want the events to always appear in a specific order, so event.depends won't work for me.