[0.9]settiles works fine, but crash when data isn't in array

This subforum contains all the issues which we already resolved.
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

[0.9]settiles works fine, but crash when data isn't in array

Post by rk84 »

Code: Select all

game.settiles({{name="sand",position={-50,-50}}}) -- works fine
game.settiles({name="sand",position={-50,-50}}) -- crash
Edit: Actually this might be false alarm. I got normal error message on second time.
Last edited by rk84 on Sat Feb 15, 2014 9:41 pm, edited 1 time in total.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: [0.9]settiles works fine, but crash when data isn't in a

Post by ficolas »

Not a bug.

You can specify more than one table so it sets more than one tiles at the same time.
Its weird but yea.
immibis
Filter Inserter
Filter Inserter
Posts: 303
Joined: Sun Mar 24, 2013 2:25 am
Contact:

Re: [0.9]settiles works fine, but crash when data isn't in a

Post by immibis »

ficolas wrote:Not a bug.

You can specify more than one table so it sets more than one tiles at the same time.
Its weird but yea.
Crashing instead of raising a Lua error is a bug.
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: [0.9]settiles works fine, but crash when data isn't in a

Post by ficolas »

I didnt mean that the crash is not a bug, only that you need to put a table inside a table.
Also it doesnt give error message when crashing because the name of the tole doesnt exist.
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.9]settiles works fine, but crash when data isn't in a

Post by kovarex »

The reason it is table in table is, that it is much less performance heavy to change a batch of files in one run than to call one by one, because the engine than has to do the tile border and variation corrections.
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.9]settiles works fine, but crash when data isn't in a

Post by kovarex »

Anyway, the crash is a bug, and it is now fixed for 0.9.1
Post Reply

Return to “Resolved Problems and Bugs”