[0.16.35] event "on_surface_created" index incorrect

This subforum contains all the issues which we already resolved.
Post Reply
Mylon
Filter Inserter
Filter Inserter
Posts: 456
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

[0.16.35] event "on_surface_created" index incorrect

Post by Mylon » Wed Mar 28, 2018 12:23 pm

When event "on_surface_created" fires for the first time, the "surface_index" returned is "1". The expected result is "2", as "nauvis" already exists by this point.

Image

The relevant code producing these statements:

Code: Select all

local surface = game.surfaces[event.surface_index]
game.print("Piety: Surface created event parsed for index: " .. event.surface_index .. ", name: " .. surface.name)

Rseding91
Factorio Staff
Factorio Staff
Posts: 9977
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.35] event "on_surface_created" index incorrect

Post by Rseding91 » Wed Mar 28, 2018 1:51 pm

Thanks for the report. It's now fixed for the next version of 0.16 or 0.17 which ever comes first.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”

Who is online

Users browsing this forum: No registered users