[0.16.35] event "on_surface_created" index incorrect

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

[0.16.35] event "on_surface_created" index incorrect

Post by Mylon »

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: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.35] event "on_surface_created" index incorrect

Post by Rseding91 »

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”