Scenario Lua: files excluded by commenting

Bugs that are actually features.
Pirion
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Mon Oct 03, 2016 12:07 am
Contact:

Scenario Lua: files excluded by commenting

Post by Pirion »

Control.lua has commented files, yet it is still running something in them.
We are receiving errors -
Response: (server1)Error in event on_player_created: "/var/www/factorio/server1/temp/currently-playing/bps.lua:12: attempt to index field 'automated-construction' (a nil value)".
Response: (server1)Error in event on_tick: "/var/www/factorio/server1/temp/currently-playing/rocket.lua:403: attempt to index local 'force_mem' (a nil value)".

However looking at the source, the requires these lines are commented & the error is from not having the variables initialized. We are running headless linux; 15.03. This was not an issue in 15.02.

Code: Select all

require "util"
require "locale/utils/event"
require "config"
require "locale/utils/admin"
--require "locale/utils/undecorator"
require "locale/utils/utils"
--require "locale/utils/gravestone"
require "locale/utils/bot"
require "autodeconstruct"
require "announcements"
--require "rocket"
--require "bps"
require "tag"
require "autofill"
--require "showhealth"
--require "locale/mapsettings/spiral"
--require "rso"
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5410
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Scenario Lua: files excluded by commenting

Post by Klonan »

Thanks for the report,

Nothing has changed with our Lua implementation since 0.14 that would cause any changes such as this,
Are you sure it isn't a scripting error or oversight?

Can you provide a easy file that can reproduce the issue?
Pirion
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Mon Oct 03, 2016 12:07 am
Contact:

Re: Scenario Lua: files excluded by commenting

Post by Pirion »

While I can't rule out a scripting oversight, We have all errors the server encounters posting to a log. This server has been running for three days and only started displaying these errors once I switched into 0.15.03. I will do some testing to determine if I can reproduce on a simpler file.

Thanks!
posila
Former Staff
Former Staff
Posts: 5448
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Scenario Lua: files excluded by commenting

Post by posila »

In 0.15.3 migration reloaded scenario scripts to fix scripts being removed by tutorial. It is possible you server has old version of the scenario and which got reloaded into the previous save.
I_IBlackI_I
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Wed Feb 20, 2013 6:57 pm
Contact:

Re: Scenario Lua: files excluded by commenting

Post by I_IBlackI_I »

Yeah we have noticed some strange stuff when using a save-file from 0.15.2 to 0.15.3, all scenario code doesn't work on the save-file, but when creating a new save-file it works fine.
posila
Former Staff
Former Staff
Posts: 5448
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Scenario Lua: files excluded by commenting

Post by posila »

You can just unzip the save replace scenario scripts and zip it back to fix the save.
Pirion
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Mon Oct 03, 2016 12:07 am
Contact:

Re: Scenario Lua: files excluded by commenting

Post by Pirion »

I realized I never posted the save. I've attached it - however I've been unable to duplicate at all. I suspect it is due to the events being registered in commented files, possibly in the migration.
We've updated our source to fully remove these files, so I don't expect we'll see it again. If anyone wants to do some testing - feel free. ; ;)
Attachments
_autosave5.zip
(10.6 MiB) Downloaded 74 times
Post Reply

Return to “Not a bug”