Page 1 of 1

[Oxyd] Dedicated Server Only Crash When Using a Forces Cmd

Posted: Mon Sep 14, 2015 5:43 pm
by StoneLegion
This little script command puts the players in their own forces and also makes turrets friends. It works fine in a Hosted MP Game but when I run the command via a Dedicated MP Game it crashes the client and Server.

Someone was so nice to make me this script while ago at the start of 12. HanziQ Feels that it should work on both MP Type games so I went ahead and made this into a bug report.

Script:

Code: Select all

/c local pforces = {}; for _, player in ipairs(game.players) do local fname = "player_" .. player.name; local force = game.forces[fname] or game.create_force(fname); player.force = force; for _, pforce in ipairs(pforces) do pforce.set_cease_fire(force.name, true); force.set_cease_fire(pforce.name, true) end; pforces[#pforces+1] = force end
Dedicated Server factorio-current.log:
http://pastebin.com/A0w09zqH


Client factorio-current.log:
http://pastebin.com/yZe5vV3m

Re: [Oxyd] Dedicated Server Only Crash When Using a Forces Cmd

Posted: Tue Sep 15, 2015 11:45 am
by Oxyd
This was actually caused by setting the force of a player who wasn't currently connected, not by using the dedicated server. Fixed in 0.12.8.

Re: [Oxyd] Dedicated Server Only Crash When Using a Forces Cmd

Posted: Wed Sep 16, 2015 9:10 pm
by StoneLegion
Thank you :)