[0.12.2] Tight-spot lua bug and fix

This subforum contains all the issues which we already resolved.
trold
Inserter
Inserter
Posts: 45
Joined: Fri Jul 31, 2015 1:07 pm
Contact:

[0.12.2] Tight-spot lua bug and fix

Post 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}}
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

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

Post by kovarex »

There is scenario pack update available and it is already fixed there, did you update the scenario pack?
trold
Inserter
Inserter
Posts: 45
Joined: Fri Jul 31, 2015 1:07 pm
Contact:

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

Post 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.
Attachments
luabug.zip
Example save of lua bug
(365.43 KiB) Downloaded 74 times
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

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

Post by kovarex »

You are right, so I fixed for the next scenario pack update.
Post Reply

Return to “Resolved Problems and Bugs”