[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2075: compact(): Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2182: Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2075: compact(): Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2182: Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2075: compact(): Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2182: Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2075: compact(): Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2182: Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2075: compact(): Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2182: Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2075: compact(): Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2182: Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2075: compact(): Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2182: Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2075: compact(): Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2182: Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2075: compact(): Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2182: Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2075: compact(): Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2182: Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2075: compact(): Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2182: Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2075: compact(): Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2182: Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2075: compact(): Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2182: Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2075: compact(): Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2182: Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2075: compact(): Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2182: Undefined variable $warn_allowed [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4218: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3103) [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4218: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3103) [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4218: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3103) [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4218: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3103) [1.1.70] commands.add_command does nothing during script.on_load and script.on_init - Factorio Forums
function add_commands()
commands.add_command("test", 'test', function()
game.print("test")
end)
end
script.on_init(add_command)
script.on_load(add_command)
You're right. However, I'm getting more and more confused.
30.985 Error ClientMultiplayerManager.cpp useful_book was registered for the following commands when the map was saved but has not re-registered them as a result of loading: candran and tl
30.985 Error ClientMultiplayerManager.cpp:99: MultiplayerManager failed: "" + multiplayer.script-command-mismatch + "
" + "
useful_book"
30.986 Info ClientMultiplayerManager.cpp:608: UpdateTick(14292533) changing state from(ConnectedLoadingMap) to(Failed)
For some reason, useful_book_0.20.3 doesn't add commands sometimes. I do the same actions and yet somehow I'm getting different results sometimes despite the same data. I don't know why and how. It did happen in singleplayer and in multiplayer. I'll publish logs as soon as I recheck it yet again with other people.
Never mind, it did happen, I'm kinda confused even more because I did the same action, and it worked fine in singleplayer.
1. That server disabled useful_book_0.20.3
2. Saved it
3. Loaded it
4. Saved it
5. Enabled useful_book_0.20.3
6. Loaded it
7. Other players can't join now because of the error
Sure, I mean this is a more specific case from the individual mod perspective, because the mod didn't change actually for itself since script.on_init happened for the mod already in the same situation. (I don't want to remove the data for other mods/scenarios)
ZwerOxotnik wrote: Tue Nov 08, 2022 5:21 pm
Sure, I mean this is a more specific case from the individual mod perspective, because the mod didn't change actually for itself since script.on_init happened for the mod already.
Yes, but most of the events don't fire for only one mod. on_init I think is one of the few that fires only for the mod that caused it.
on_configuration_changed, however, when it fires off, it does so for all mods.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics