inst:ListenForEvent("gotnewitem", function(inst, data)
if data then print("data") end
if data.item then print("data.item") end
if data.slot then print("data.slot") end
if data.src_pos then print("data.src_pos") end
end)
I'm tested this code in dedicated server as client and the code works fine. But if I start hosting without dedicated server, data.src_pos will return nil.
So I hope you guys can fix it.
Steps to Reproduce
Start hosting through "dontstarve_steam.exe" , create a new server. In game pickup a new item and it's will print "data", "data.item", "data.slot" but not "data.src_pos" because it's nil.
Start hosting through "dontstarve_steam.exe" , create a new server. In game pickup a new item and it's will print "data", "data.item", "data.slot" but not "data.src_pos" because it's nil.
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now