Page 1 of 1

[0.12.2] Tight-spot lua bug and fix

Posted: Sat Aug 01, 2015 6:09 am
by trold
It seems that 0.12 broke the tight-spot scenario. Whenever an item is inserted into the smart chest, the lua script crashes to menu, with an error in line 272 of data/scenario-pack/campaigns/tight-spot/lualib/tightspot.lua. The line is

Code: Select all

game.create_entity{name = "flying-text", position = resultchest.position, text = "+" .. addition, color = {g = 1}}
To fix the error, change that line to

Code: Select all

game.player.surface.create_entity{name = "flying-text", position = resultchest.position, text = "+" .. addition, color = {g = 1}}

Re: [0.12.2] Tight-spot lua bug and fix

Posted: Thu Aug 06, 2015 5:49 pm
by kovarex
There is scenario pack update available and it is already fixed there, did you update the scenario pack?

Re: [0.12.2] Tight-spot lua bug and fix

Posted: Thu Aug 06, 2015 10:12 pm
by trold
I have reproduced the bug in a vanilla 0.12.2 install with the most recent 0.12.1 scenario pack:

Image

As soon as an item is delivered, the scenario crashes:

Image

I have attached a small example save, but any attempt at playing the scenario should reproduce the bug.

Re: [0.12.2] Tight-spot lua bug and fix

Posted: Fri Aug 07, 2015 10:12 am
by kovarex
You are right, so I fixed for the next scenario pack update.