what_day_of_scenario()
Author | Topic: what_day_of_scenario() |
---|---|
Master
Member # 5977
|
written Wednesday, July 5 2006 23:31
Profile
Homepage
this call makes me wonder. I put it into a script which worked fine, but since two days ago it refuses to work proparly. I did some debugging tests, and found that the current day is day_shown_on_screen - 1. so, what we would think is day 1, is day 0 with this call. Was it like that all along? For better reference, here are the scripts involved: rivers.txt, START_STATE: and t28filbertondlg.txt, one of the dialogue nodes: What happens is this: In t28filbertondlg.txt you make an appointment to see the mayor of that town for the next town. flag 28,0 is set to 1, to sinify that an appointment was made, 200,2 is set to 0 just to make sure it will be 0, and flag 250,4 is set to a variable: day1, according to what_day_of_scenario(), which I think is the problem here. After that, in rivers.txt (the scenario script) the following thing are checked: is flag 28,0 == 1? If so, then continue, as an appointment was made; is flag 200,2 == 0? If so, then continue, as this message wasn't displayed as yet; is day1, which is set according to flag 250,4, (day1 + 1) == what_day_of_scenario? If so, show the message that an appointment was made for today. However, it seems as though all this isn't done. I checked this last sequence of events (in rivers.txt) by leaving out the flags 28,0 and 200,2. It still didn't work, which means that there must be something wrong with the variable day1, or the call what_day_of_scenario. In the dialogue node I put here for you people to look at, I have added several print_num() calls. On day 1, this is what the values of the variables and calls give me: day1 = 0 (?) 250,4 = 0 (?) 28,0 = 1 (that's okay) 200,2 = 0 (that's okay) what_day_of_scenario() = 0 (?) If its not the call, can anybody of you guys spot the problem? Its only now that it stopped working. before it worked perfectly. The strangest thing is, is that I can't remember changing anything about these two script (rivers.txt and t28filbertondlg.txt). I hope anybody can help. -------------------- Play and rate my scenarios: Where the rivers meet View my upcoming scenario: The Nephil Search: Escape. Give us your drek! Posts: 3029 | Registered: Saturday, June 18 2005 07:00 |
...b10010b...
Member # 869
|
written Wednesday, July 5 2006 23:58
Profile
Homepage
The call is behaving normally. The day given by the call is indeed always 1 day earlier than the displayed day, so the first day of the scenario is day 0. -------------------- The Empire Always Loses: This Time For Sure! Posts: 9973 | Registered: Saturday, March 30 2002 08:00 |
Off With Their Heads
Member # 4045
|
written Thursday, July 6 2006 07:25
Profile
Homepage
Something to add here, I suppose. -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |
Master
Member # 5977
|
written Thursday, July 6 2006 07:34
Profile
Homepage
So, if the call is behaving normally, can anybody look at the scripts and please tell em why it doesn't work? Thanks in advance. -------------------- Play and rate my scenarios: Where the rivers meet View my upcoming scenario: The Nephil Search: Escape. Give us your drek! Posts: 3029 | Registered: Saturday, June 18 2005 07:00 |
Shaper
Member # 3442
|
written Thursday, July 6 2006 07:42
Profile
Homepage
Thralni: After our talk last night, I managed to get the Mayor to see me. However, he did half-way through the day instead of at the start. My code is similar to yours, but this worked: I have no idea why though. -------------------- And when you want to Live How do you start? Where do you go? Who do you need to know? Posts: 2864 | Registered: Monday, September 8 2003 07:00 |
Master
Member # 5977
|
written Thursday, July 6 2006 08:45
Profile
Homepage
Small update: I continued testing, and it appears that rivers.txt is not run, at least not the START_STATE. Is there any reason for that to happen? EDIT: And another small update: I checked rivers.txt with alint, and it returned two errors, both errors of syntax, so I gather that there is something wrong with the +'s, -'s and such. I can't find the problem... Can you? [ Thursday, July 06, 2006 09:19: Message edited by: Mc 'mini' Thralni ] -------------------- Play and rate my scenarios: Where the rivers meet View my upcoming scenario: The Nephil Search: Escape. Give us your drek! Posts: 3029 | Registered: Saturday, June 18 2005 07:00 |