Geoff the Medio wrote:Try wrapping (the whole Sum expression) in brackets.
Did that:
Code: Select all
parameters = [
tag = "ind_target" data =
[Sum value = LocalCandidate.TargetIndustry condition And [
Planet
OwnedBy empire = Source.Owner
]]
]
And ended up with a flat out crash on game start up, I don't even get to the "Load Game" panel, with no indication whatsoever in freeorion.log:
Code: Select all
2016-02-01 00:28:53.510903 [debug] Client : Logger initialized
2016-02-01 00:28:53.511905 [debug] Client : v0.4.5+ [build 2016-01-26.4b9a098] MSVC 2013
2016-02-01 00:28:53.511905 [debug] Client : GL Version String: 4.5.0 NVIDIA 359.00
2016-02-01 00:28:53.511905 [debug] Client : Dependency versions from headers:
2016-02-01 00:28:53.511905 [debug] Client : Boost: 1_58
2016-02-01 00:28:53.511905 [debug] Client : FreeType: 2.5.5
2016-02-01 00:28:53.511905 [debug] Client : PNG: 1.6.17
2016-02-01 00:28:53.511905 [debug] Client : Python: 2.7.9
2016-02-01 00:28:53.511905 [debug] Client : SDL: 2.0.3
2016-02-01 00:28:53.511905 [debug] Client : zlib: 1.2.8
2016-02-01 00:28:53.668907 [debug] Client : OpenAL initialized. Version 1.1 ALSOFT 1.15.1Renderer OpenAL SoftVendor OpenAL Community
Extensions: AL_EXT_ALAW AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFTX_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_source_latency
2016-02-01 00:28:53.669408 [error] Client : CUIWnd.cpp:636 : CUIWnd::SaveOptions() : "map.sidepanel" has not been initialized.
(This is the entire log, and, BTW, I think the sidepanel thing has nothing to do with this problem - it's been there all the time).
Also tried with parentehsis instead of brackets:
Code: Select all
parameters = [
tag = "ind_target" data =
(Sum value = LocalCandidate.TargetIndustry condition And [
Planet
OwnedBy empire = Source.Owner
])
]
Got the same error as before, expected unnamed-rule, pointing to the "c" in condition.
Geoff the Medio wrote:I also suggest starting with something simple, then incrementally adding complexity and making sure it keeps working at each step.
Yeps, I did that. I'm well acquainted with the concept of incremental development. I had it working with a flat message, and with a parameterized one which did not use statistics.
Geoff the Medio wrote:Most / all sitrep data expressions in the existing scripts are pretty simple, not involving a statistic like Sum, so it's possible there's a problem with parsing of statistics within a GenerateSitRepMessage parameters list.
Well, ok. If we concluded that is the case, then I think this is a bug. Should I register an Issue at Github?
BTW, I want to let it registered that you guys have been doing a very, very good work in building this amazing game. I used to be a Java programmer (changed careers, I'm a lawyer now), and I really can apreciate the amount of dedication and effort that has been devoted to this project.
All contributions are released under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidelines.