Colony Integrator Error
Karma-Fox opened this issue ยท 18 comments
Descripe
When trying to use getRequest(), e NullPointer Exception is thrown. This is on 15b.
Steps to reproduce
Create code using getRequest()
Run Code
Read Error.
Multiplayer?
Yes
Version
1.18.2-0.7.14b (Latest 1.18)
Minecraft, Forge and maybe other related mods versions
Forge 40.1.47 Minecraft 1.18.2
Screenshots or Videos
See above
Crashlog/log
Providing an update here. This error seems to be getting caused if ANY hut has a minimum stock set. Removing minimum stock from all huts removes this error and allows the block to work.
Further note. This same error also occurs if you use the Postbox to request something.
Also seeing this error, But it only started today not been able to connect it to postbox or min stock though
advancedperipherals-1.18.2-0.7.15b.zip
Hey, could you try it again with this version? It will probably not work, but I need the new generated (crash)log
Unzip the file before using
Still getting the same error with your edited file
Error from latest.log
https://pastebin.com/EJY46wV5
advancedperipherals-1.18.2-0.7.15b.zip
I now know what the issue is. And I think I got it fixed.
Free to test ๐
The exception looks to be fixed, but now getting an error in my Lua
error:
attempt to index global 'target' (a nil value)
Lua snippet:
local colony = peripheral.find("colonyIntegrator")
workRequests = colony.getRequests()
for w in pairs(workRequests) do
target = workRequests[w].target
for word in target:gmatch("%S+") do --This line
table.insert(target_words, word)
target_length = target_length + 1
end
end
This is an issue at the end of minecolonies. I contacted them and I now wait for an answer
Explanation
The exception throws when the requester of a request is not a citizen - like a restaurant
I'll send more updates about this in the next days. In the meanwhile, target will be nil if the requester is not a citizen
Soo. I just found out. One of the other players had set some min stock levels in the restaurant. I removed them and it fixed the nil error.
So I agree with your diagnosis. It looks to be min stock requests (i.e. non citizen requests) that are causing this
Fixed in
ldtteam/minecolonies#8501
Do you want to test it with 1.18.2-0.7.15b?
That link is for 1.16.5 and I don't see that change being listed in any of the 1.18.2 files.
That link is for 1.16.5 and I don't see that change being listed in any of the 1.18.2 files.
Yeah, 1.18.2-1.0.883-ALPHA contains the fix. The changelog only shows the newest commit.