Page 1 of 1

0.15 lua command

Posted: Thu Aug 31, 2017 2:44 pm
by kenvas
About 0.15 Lua commands

I can't understand it: Factorio\doc-html Inside command.
now “/c game.local_player.insert{name="speed-module-3", count=50}" This command An error will occur. Unable to obtain items.
As shown:
QQ图片20170831223905.png
QQ图片20170831223905.png (333.44 KiB) Viewed 3031 times
Please know, can help solve. Present can be directly generated speed moule 3 Command.

thank you very much indeed

Re: 0.15 lua command

Posted: Thu Aug 31, 2017 3:16 pm
by aaargha
I can't find the docs you're referring to but I think it should only be "player" not "local_player", like so:

Code: Select all

/c game.player.insert{name="speed-module-3", count=50}

Re: 0.15 lua command

Posted: Thu Aug 31, 2017 4:00 pm
by steinio
aaargha wrote:I can't find the docs you're referring to but I think it should only be "player" not "local_player", like so:

Code: Select all

/c game.player.insert{name="speed-module-3", count=50}
http://lua-api.factorio.com/latest/LuaG ... ipt.player

Code: Select all

game.players[1]
should also work.

Re: 0.15 lua command

Posted: Thu Aug 31, 2017 7:13 pm
by prg
Version 0.13.0
  • game.local_player has been renamed to game.player and now works through remote calls.

Re: 0.15 lua command

Posted: Thu Aug 31, 2017 7:29 pm
by aaargha
prg wrote:Version 0.13.0
  • game.local_player has been renamed to game.player and now works through remote calls.
That would explain it.

Re: 0.15 lua command

Posted: Fri Sep 01, 2017 3:27 am
by kenvas
aaargha wrote:I can't find the docs you're referring to but I think it should only be "player" not "local_player", like so:

Code: Select all

/c game.player.insert{name="speed-module-3", count=50}
Thanks very much
The problem has been settled
Indeed, as you say..