Yes, indeed..
I must have somehow mangled the file. II restored a backup from a fresh install, just copy-pasted your code and it worked.
Many thanks for the attention!
Help with script Parse Error - Expected unnamed-rule
Moderator: Committer
- Cpeosphoros
- Space Kraken
- Posts: 124
- Joined: Sat Jan 30, 2016 11:29 am
Re: Help with script Parse Error - Expected unnamed-rule
All contributions are released under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidelines.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Help with script Parse Error - Expected unnamed-rule
I think I've fixed the parser so that it can't get too deep into parsing a statistic before realizing it is a different type than it initially thought, so it should work without the "0.0 +" out front now.
- Cpeosphoros
- Space Kraken
- Posts: 124
- Joined: Sat Jan 30, 2016 11:29 am
Re: Help with script Parse Error - Expected unnamed-rule
Nice.
If you have some time at hand, you may want to have a look at when SitReps are processed. As it is now, looking from outside, I guess they are being processed before effects which affect the planet's meters.
In other words, the statistics I'm getting, both for Industry and Research, are 1 turn delayed. They give me the correct totals for the end of the last turn, not the beginning of the new one.
If you have some time at hand, you may want to have a look at when SitReps are processed. As it is now, looking from outside, I guess they are being processed before effects which affect the planet's meters.
In other words, the statistics I'm getting, both for Industry and Research, are 1 turn delayed. They give me the correct totals for the end of the last turn, not the beginning of the new one.
All contributions are released under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidelines.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Help with script Parse Error - Expected unnamed-rule
You are writing an effect that generates sitreps, so it records the values in the gamestate before that execution of effects. Other sitreps are generated at other times, and if they include any gamestate information, it is from the time they are created. Most sitreps don't have things like meter values in them though, but rather just species names or object or empire IDs, which don't depend on timing with respect to meter updates.Cpeosphoros wrote:If you have some time at hand, you may want to have a look at when SitReps are processed. As it is now, looking from outside, I guess they are being processed before effects which affect the planet's meters.