Hi there! I newly downloaded the lua mod and I found it interesting and eductional, however I think it may be malfunctioning. Whenever I put sulfuric acid on stone, a message gets displayed saying "scripts/downloaded/121 Kev_AK-CHEM-MOD V1_2B.lua:1258: bad argument #3 to 'partProperty' (number expected, got nil)". And other error messages are written for example when sodium hydroxide touches sulfuric acid, the same message comes up with an additional messages mentioning that "hygn" is an unrecognized element.
Hey fellas, so funnily enough I had this same issue as above, for anybody having issues in the future:
it means the script is trying to change a particle into an element that doesn't exist, or is misspelled. In Powder Toy/Lua, if a property value evaluates to nil, the game has a stroke and spams the log.
For example, I was having an issue with 1605 and 679
679 was:
sim.partProperty(i, "type", elem.DEFAULT_PT_NITG)
However, either the mod itself or another basically renamed Nitrogen/NITG to "N2"
I changed it to
sim.partProperty(i, "type", elem.KEV_PT_N2)
Worked perfectly fine.
So a TLDR:
Look for lines that look like this: sim.partProperty(i, "type", elem.SOME_ELEMENT)
Basically, the elem.SOME_ELEMENT is wrong.
If it says [elem.DEFAULT_PT_~] but it's a custom element, change DEFAULT_ to the mod’s custom prefix (e.g., KEV_ or MOD_).If it uses a base-game element that doesn't exist (like DEFAULT_PT_N2O), the author made a typo or something stole it. Change it to the mod's custom ID.
Nitrogen is usually NITG or whatever, but since whatever I have sprinkled on top of TPT changed it to N2, it required switching it over to the "N2" identifier.