factoriommo / factoriommoscenarios

FactorioMMO community admin tools repository
0 stars 13 forks source link

Error using multiplayer map as single player #47

Open Trblz42 opened 5 years ago

Trblz42 commented 5 years ago

After i saved a multiplayer file (RPG the Grid -and- Brutality) and tried to load as single player on my computer, i get a crash upon closing the popup menu

Workaround: Change control.lua and remove/comment out the line with "lualib/modular_admin/modular_admin"

IBlackI commented 5 years ago

I have been unable to recreate this issue. Please post the steps to recreate it. I have tried.

  1. Join the [FactorioMMO] Brutality server
  2. Save the game
  3. Open the game in single player
  4. Click close on the modular_information window.

and

  1. Join the [FactorioMMO] Brutality server
  2. Create a new world from the rpg scenario
  3. Click close on the modular_information window.

Please also post the save-file / scenario code

Sergeant-Steve commented 5 years ago

I can confirm the bug by playing the map with a username that is not an admin (in this case I logged out my Factorio Account and changed my name to "Rothguard" who also had the same issue). I think the bug is caused because the player is not an admin and the function in line 149 of modular_admin.lua is not checking if player is not an admin. The code that creates that menu is checking if the user is an admin and is not creating the menu but the code that calls it is not checking if the player is an admin so ends up calling a nil value. screenshot 2018-12-08 18 14 10