[0.15.1] Wrong param "player_port" in on_train_created

Things that has been reported already before.
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

[0.15.1] Wrong param "player_port" in on_train_created

Post by Mooncat »

Bug:
API doc says the on_train_created event contains "train", but it actually contains "player_port".


Expected:
It should contain "train" instead of "player_port".


Steps to reproduce:
1) Start a game.

2) Input command:

Code: Select all

/c script.on_event(defines.events.on_train_created, function(event) for param_name, param in pairs(event) do game.print(param_name) end end)
which prints all param names on console.

3) Create a train.

4) It should show:
  • name
  • tick
  • player_port
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [0.15.1] Wrong param "player_port" in on_train_created

Post by Mooncat »

Choumiko wrote:Already fixed: viewtopic.php?f=30&t=44838
oh, thanks!
Searched "on_train_created" but no result appeared. That's weird.
Post Reply

Return to “Duplicates”