Hi
here is my code:
but it is not working when i craft M4 and M4 Crafts successfully and this error happens:
then i decided to change If CraftingEvent.Item.Name == "M4": to If CraftingEvent.ItemName == "M4":
Then when i craft M4 nothing happens in the console and M4 Crafts successfully!!
here is my code:
Python:
class CraftLimiter:
def On_Crafting(self, CraftingEvent):
if CraftingEvent.Item.Name == "M4":
CraftingEvent.Cancel()

then i decided to change If CraftingEvent.Item.Name == "M4": to If CraftingEvent.ItemName == "M4":
Then when i craft M4 nothing happens in the console and M4 Crafts successfully!!