Oarcinae / FactorioScenarioMultiplayerSpawn

A custom scenario for Factorio which provides each player a unique starting spawn point in a multiplayer game.
MIT License
49 stars 30 forks source link

Attempting to call math.random() outside an event or during loading #131

Closed bplein closed 3 years ago

bplein commented 3 years ago

I just refreshed OARC with a git pull, and tried to start a new map (using my desktop game, with the vanilla example-config.lua) and got this on launch.

I also tried it on my linux server and got the same results trying to start a new scenario2map.

Attempting to call math.random() outside an event or during loading. This is invalid and will cause desyncs.
stack traceback:
    [C]: in function 'random'
    ...ation Support/factorio/temp/currently-playing/config.lua:211: in main chunk
    [C]: in function 'require'
    ...rt/factorio/temp/currently-playing/lib/frontier_silo.lua:5: in main chunk
    [C]: in function 'require'
    ...tion Support/factorio/temp/currently-playing/control.lua:29: in main chunk
bplein commented 3 years ago

Found it. it's the new math.random in example-config.lua. Changed those to static values and it works correctly now.

Oarcinae commented 3 years ago

Yeah sorry this was my bad, pushed without including that change. Should be fixed now! Thanks!