Topic: lua: if statement do not work
kaputtnik![]() Topic Opener |
Posted at:
2018-01-09, 17:45 UTC+1.0
I want to check if a field has an immovable and if it has one, the loop has to break. This example do not work:
I put a print statements before the
What is the difference? Why does the first example do not work? In the first example i have also tried to enclose the if-condition in braces, but this does not work also... it drives me crazy
Edited:
2018-01-09, 17:48 UTC+1.0
![]() ![]() |
SirVer |
Posted at:
2018-01-09, 19:55 UTC+1.0
Both examples should work just fine. I am skeptical if this is indeed the full code. For example, if Can you make the full code available somewhere for investigation? ![]() ![]() |
kaputtnik![]() Topic Opener |
Posted at:
2018-01-09, 21:28 UTC+1.0
You can find a scenario map here: https://c.1und1.de/@520176427140645159/g-IjyQ6VRx2p-QeiQXSmvw The function showing the problem is in scripting/story_script and is called wobble_field() Thanks for looking into this issue ![]() ![]() |
hessenfarmer![]() |
Posted at:
2018-01-10, 13:38 UTC+1.0
Perhaps the problem might be that it should read f.immovable instead of f.immmovable like in your script. BTW: Really looking foraward for the scenario Edited by kaputtnik: Make this post visible
Edited:
2018-01-10, 16:29 UTC+1.0
![]() ![]() |
hessenfarmer![]() |
Posted at:
2018-01-10, 13:39 UTC+1.0
Since when the comments have to be moderated? I just sent a comment explaining the issue and used some funny strings could this be the problem?
Edited:
2018-01-10, 13:40 UTC+1.0
![]() ![]() |
hessenfarmer![]() |
Posted at:
2018-01-10, 13:42 UTC+1.0
Okay then again the solution for you kaputtnik without any sense of humour. the error might be just a typo just remove one "m" from immmovable. Really looking forward to the scenario though
Edited:
2018-01-10, 13:47 UTC+1.0
![]() ![]() |
kaputtnik![]() Topic Opener |
Posted at:
2018-01-10, 16:29 UTC+1.0
Sometimes they have to ...
No, the problem was quoting my post, which triggered our spam checker to hide the post. Sorry for inconvenience ![]() ![]() |
kaputtnik![]() Topic Opener |
Posted at:
2018-01-10, 16:45 UTC+1.0
Oh... i didn't saw that, really... and strange that no error was triggered... Many thanks for clearing this up These kind of failures could make one spend hours to find the failure, at least me May i need your help with this scenario, i have some ideas but i am not sure if they could be implemented. But i see creating a scenario is a huge work, and i have big respect regarding your work on the empire 4 scenario! ![]() ![]() |
hessenfarmer![]() |
Posted at:
2018-01-10, 22:47 UTC+1.0
you are welcome If I could help I will do so, although I have already some ideas for Empire 05 ![]() ![]() |
GunChleoc![]() |
Posted at:
2018-01-17, 14:56 UTC+1.0
The reason that this will not crash that Lua interprets Busy indexing nil values ![]() ![]() |