Hello i've been modding for while and made mod for tinting with help of somebody on Factorio discord but nobody could find out what my error means,
error is 100% replicatable
error is in serpernt.block
error and log files are atteched to this post
what i was about to do ? i have some functions that loops a lot but main thing is to give function sprite and tint color
after that my function should recursively run until it finds sprite with hr_version or layers, after that it tints
what i got ? Error... error about boolean on sprite ? yeah i cant give more detail cause there is nothing very useful in logs if you undestand modding then check it out thanks everyone !!
Any suggestions are accepted too! this might be question for devs too.
Bug in offshore-pump sprite tint
-
- Burner Inserter
- Posts: 13
- Joined: Wed Nov 25, 2020 1:44 pm
- Contact:
Bug in offshore-pump sprite tint
- Attachments
-
- Blui_1.0.0.zip
- (2.01 KiB) Downloaded 67 times
-
- factorio-previous.log
- (19.57 KiB) Downloaded 62 times
-
- factorio-current.log
- (19.57 KiB) Downloaded 60 times
Re: Bug in offshore-pump sprite tint
You wrongly assume that the argument "sprite" that you pass on to setTint() will always be a table. The error in this case was caused in solveWorldPoints(), where you iterate over all values in the table and call setTint() for each value. Just add a type check and it should work. I've made a minimal example (removed cruft, added logging, and added the check) that will work. Just replace data-updates.lua with this version, run it, and check the log file. You probably should add such a test to dePipeIfy as well. It didn't throw an error with the prototypes you've used, but it could crash with other prototypes.Ondras4620 wrote: ↑Thu Dec 30, 2021 11:14 amwhat i was about to do ? i have some functions that loops a lot but main thing is to give function sprite and tint color
after that my function should recursively run until it finds sprite with hr_version or layers, after that it tints
what i got ? Error... error about boolean on sprite ? yeah i cant give more detail cause there is nothing very useful in logs if you undestand modding then check it out thanks everyone !!
- Attachments
-
- data-updates.lua
- (1.04 KiB) Downloaded 62 times
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!