Search found 2 matches

by hjfmailbox
Wed Jan 14, 2026 2:21 pm
Forum: Modding help
Topic: Invalid QualityID Error When Calling `get_max_wire_distance()` in Factorio 2.0
Replies: 2
Views: 203

Re: Invalid QualityID Error When Calling `get_max_wire_distance()` in Factorio 2.0


Lua says that if you call `prototype:get_max_wire_distance("normal")` (using ":") then it passes `prototype` as first parameter and "normal" becomes second parameter. Please use correct call (using "."):

prototype.get_max_wire_distance("normal")

In that case you can also not provide quality ...
by hjfmailbox
Wed Jan 14, 2026 12:21 pm
Forum: Modding help
Topic: Invalid QualityID Error When Calling `get_max_wire_distance()` in Factorio 2.0
Replies: 2
Views: 203

Invalid QualityID Error When Calling `get_max_wire_distance()` in Factorio 2.0

Description:
I'm encountering a persistent error when calling the `get_max_wire_distance()` method on `LuaEntityPrototype` objects in Factorio 2.0. I've tried multiple approaches but all are failing with the same error.

Environment:
- Factorio Version: 2.0.72

Problem:
When calling `prototype:get ...

Go to advanced search