I'll start with an example!
1. The code produces unwanted behavior.
2. Lua, TFS 1.2.
item:setCustomAttribute(ATTR_CUSTOM_CRITICAL_CHANCE, 5) is a custom function. There is nothing wrong in this line.
3. N/A
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if...