Page 1 of 1

[0.15.1] Wrong param "player_port" in on_train_created

Posted: Tue Apr 25, 2017 7:17 pm
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

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

Posted: Tue Apr 25, 2017 8:04 pm
by Choumiko

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

Posted: Wed Apr 26, 2017 1:33 am
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.