Yet another train manager


A mod to manage a network of train and station. Some stations provide products (item or fluid) to the network, others stations request products. The mod allocate trains to carry product from provider to requester. This mod is highly inspired from the great mod LTN but with a completly different implementaton.

Content
2 months ago
2.0
520
Trains

g error with OARC mod

3 months ago
(updated 3 months ago)

when using with OARC mod in multiplayer server, this error happens

Error while running event yet_another_train_manager::on_nth_tick(60)
__yet_another_train_manager__/scripts/tools.lua:75: attempt to index local 'player' (a nil value)
stack traceback:
    __yet_another_train_manager__/scripts/tools.lua:75: in function 'get_vars'
    __yet_another_train_manager__/scripts/ui/frame.lua:496: in function 'handler'
    __yet_another_train_manager__/scripts/tools.lua:317: in function 'previous'
    __yet_another_train_manager__/scripts/tools.lua:316: in function <__yet_another_train_manager__/scripts/tools.lua:315>

this isn't happening in singleplayer mod.
to reproduce:

  1. use space-age, yatm, oarc
  2. generate map in singleplayer mod, and copy to dedicated server <- required!! creating map in dedicated server won't create above error
  3. start server
  4. login to server then above error will shown
3 months ago

Should be fixed in 1.0.12. I have not fully tested your configuration. Let me know if it is ok.

3 months ago

I played for ~3 hours and it runs without any problem. thank you!

3 months ago

I got another crash

 153.668 Error MainLoop.cpp:1508: Exception at tick 12028994: The mod Yet another train manager (1.0.12) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event yet_another_train_manager::on_gui_click (ID 1)
Only callable on choose-elem-button.
stack traceback:
    [C]: in function '__index'
    __yet_another_train_manager__/scripts/ui/frame.lua:537: in function 'handler'
    __yet_another_train_manager__/scripts/tools.lua:452: in function 'previous'
    __yet_another_train_manager__/scripts/tools.lua:302: in function <__yet_another_train_manager__/scripts/tools.lua:301>
 153.668 Error ServerMultiplayerManager.cpp:84: MultiplayerManager failed: "The mod Yet another train manager (1.0.12) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event yet_another_train_manager::on_gui_click (ID 1)
Only callable on choose-elem-button.
stack traceback:
    [C]: in function '__index'
    __yet_another_train_manager__/scripts/ui/frame.lua:537: in function 'handler'
    __yet_another_train_manager__/scripts/tools.lua:452: in function 'previous'
    __yet_another_train_manager__/scripts/tools.lua:302: in function <__yet_another_train_manager__/scripts/tools.lua:301>"

it's happening when I click the item icon in YATM - events tab
save zip file: https://drive.google.com/file/d/179UKkeX6IFe9f4nrFNbBLbiWw2TkllQ6/view?usp=sharing

3 months ago

Thanks for report. Should be fixed in 1.0.13.

3 months ago

thank you! however I got another crash error

29961.509 Error MainLoop.cpp:1508: Exception at tick 15583422: The mod Yet another train manager (1.0.13) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event yet_another_train_manager::on_train_changed_state (ID 29)
__yet_another_train_manager__/scripts/train_manager.lua:550: attempt to index local 'delivery' (a nil value)
stack traceback:
    __yet_another_train_manager__/scripts/train_manager.lua:550: in function <__yet_another_train_manager__/scripts/train_manager.lua:322>
29961.509 Error ServerMultiplayerManager.cpp:84: MultiplayerManager failed: "The mod Yet another train manager (1.0.13) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event yet_another_train_manager::on_train_changed_state (ID 29)
__yet_another_train_manager__/scripts/train_manager.lua:550: attempt to index local 'delivery' (a nil value)
stack traceback:
    __yet_another_train_manager__/scripts/train_manager.lua:550: in function <__yet_another_train_manager__/scripts/train_manager.lua:322>"

in this case I don't know why exactly it happened, so I can't share reproducible step sorry :(
I'll let you know when I find the way or if I get another issue.

3 months ago
(updated 3 months ago)

save file: https://drive.google.com/file/d/1-CVIUKZp7O4yX_1omBU6NNjeIXOjBYA8/view?usp=sharing

to reproduce: do one of these actions
- remove YATM device on (1286, -157)
- remove train attached to the above YATM device
- load item following the below image

https://imgur.com/a/uG7xplE

however, destroying train (using gun, not just removing) doesn't crash and work fine

3 months ago
(updated 3 months ago)

Should be fixed in 1.0.14. I cannot reproduce the crash so let me know if it is ok.

3 months ago

works well, thanks!

New response