Help with script Parse Error - Expected unnamed-rule

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Message
Author
User avatar
Cpeosphoros
Space Kraken
Posts: 123
Joined: Sat Jan 30, 2016 11:29 am

Re: Help with script Parse Error - Expected unnamed-rule

#16 Post by Cpeosphoros » Mon Feb 01, 2016 9:38 pm

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!
All contributions are released under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidelines.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12282
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Help with script Parse Error - Expected unnamed-rule

#17 Post by Geoff the Medio » Wed Feb 03, 2016 2:45 pm

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.

User avatar
Cpeosphoros
Space Kraken
Posts: 123
Joined: Sat Jan 30, 2016 11:29 am

Re: Help with script Parse Error - Expected unnamed-rule

#18 Post by Cpeosphoros » Wed Feb 03, 2016 6:41 pm

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.
All contributions are released under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidelines.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12282
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Help with script Parse Error - Expected unnamed-rule

#19 Post by Geoff the Medio » Wed Feb 03, 2016 6:54 pm

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.
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.

Post Reply