[Bug] Overlapping HedgewarsScriptLoad
Sun, 2026-02-08 14:54
h3oCharles allegedly wrote:
i found a nasty bug with LuaUtil: HedgewarsScriptLoad where overlapping function names make parts of scripts not trigger at all. Combine that with multiple libraries unknowingly spaghetti coded by me, things went haywire without knowing me (at the time) what happened.
to prove this, i made a makeshift bit of code.
- go to local multiplayer, put two teams down, load the "overlapping" style and start the game
- open chat, type "/lua" and hit enter, followed by typing "testnumber1000()" and hitting enter
- you should see "test number1000from the second script worked", but not "test number 1000 worked"
in my mind/workload, both of the libraries should've triggered, but because of the overlapping function names, they did not, and only the latest one loaded.
Quoting and referencing myself from this wall of text
oh hi
