miniMAXIme: Character scaler and selector

by Pi-C

The player stands like a giant near the vehicles. Now you can adjust the size of your character -- and you can change your appearance at any time if you've other mods that provide extra characters!

Tweaks
11 days ago
0.16 - 2.0
26.4K

b crash

1 year, 2 months ago

The mod miniMAXIme: Character scaler and selector (1.1.36) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event minime::on_gui_click (ID 1)
minime/scripts/gui_stuff/gui_char_selector.lua:1486: attempt to compare boolean with number
stack traceback:
minime/scripts/gui_stuff/gui_char_selector.lua:1486: in function 'on_gui_selection_state_changed'
minime/scripts/gui.lua:408: in function 'on_gui_selection_state_changed'
minime/scripts/gui_stuff/gui_char_selector.lua:457: in function 'update_page_selector_buttons'
minime/scripts/gui_stuff/gui_char_selector.lua:1418: in function 'on_gui_click'
minime/scripts/gui.lua:374: in function 'event_handler'
minime/scripts/events.lua:287: in function <minime/scripts/events.lua:284>
1471.468 Error ServerMultiplayerManager.cpp:92: MultiplayerManager failed: "The mod miniMAXIme: Character scaler and selector (1.1.36) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event minime::on_gui_click (ID 1)
minime/scripts/gui_stuff/gui_char_selector.lua:1486: attempt to compare boolean with number
stack traceback:
minime/scripts/gui_stuff/gui_char_selector.lua:1486: in function 'on_gui_selection_state_changed'
minime/scripts/gui.lua:408: in function 'on_gui_selection_state_changed'
minime/scripts/gui_stuff/gui_char_selector.lua:457: in function 'update_page_selector_buttons'
minime/scripts/gui_stuff/gui_char_selector.lua:1418: in function 'on_gui_click'
minime/scripts/gui.lua:374: in function 'event_handler'
minime/scripts/events.lua:287: in function <minime/scripts/events.lua:284>"
1471.468 Info ServerMultiplayerManager.cpp:813: updateTick(85933) changing state from(InGame) to(Failed)
1471.483 Quitting: multiplayer error.
1471.573 Info ServerMultiplayerManager.cpp:154: Quitting multiplayer connection.
1471.573 Info ServerMultiplayerManager.cpp:813: updateTick(4294967295) changing state from(Failed) to(Closed)
1471.573 Info HttpSharedState.cpp:58: Downloading https://multiplayer.factorio.com/remove-game/15802583
1472.352 Info UDPSocket.cpp:233: Closing socket
1472.352 Info UDPSocket.cpp:263: Socket closed
1472.352 Info UDPSocket.cpp:233: Closing socket
1472.392 Info UDPSocket.cpp:233: Closing socket
1472.392 Info UDPSocket.cpp:263: Socket closed
1472.393 Goodbye

1 year, 2 months ago

Hi! Thanks for reporting this. Please add this line before lines 1483/1484 of scripts/gui_stuff/gui_char_selector.lua:

log(string.format("element.name: %s\nbuttons.previous: %s\nbuttons.next: %s", element.name, buttons.previous, buttons.next))

1483:    new_page = (element.name == buttons.previous and old_page - 1) or
1484:                       (element.name == buttons.next and old_page + 1)

This doesn't fix anything yet, but there seems to be something wrong with my conditions and I want to find out why both tests result in false instead of a number. So next time the crash occurs, please post the output of the new line (at the end of the log file, just before the error message).

1 year, 2 months ago

Can you put the code on GitHub?

1 year, 2 months ago

I don't have any experience using Git, and no GitHub account. Also, I've moved to Linux about 20 years ago because I wanted to get rid of MS on my computer, so I really wouldn't want to sign up on a platform owned by MS …

1 year, 2 months ago

you're biased

1 year, 2 months ago

Then let me talk about the steps for stable reproduction.
Repeatedly forward and backward to turn pages, or jump pages, and then open the available characters to switch.
It crashed after turning the page about 10 times.

1 year, 2 months ago

I suggest you give git a try, it is a tool used by almost all open source software

1 year, 2 months ago

so you don't have to bother pasting the code here

10 months ago

The error is "attempt to compare boolean with number", so it seems element.name == buttons.previous and element.name == buttons.next both fail. I've added some extra logging before the line with the crash.

If you get the crash again with version 1.1.37, please post that as well the last lines before the crash as well, they should show what button clicks the mod actually registers.

New response