[01:36:25]: [string "scripts/messagebottletreasures.lua"]:210: attempt to index local 'item' (a nil value)
LUA ERROR stack traceback:
scripts/messagebottletreasures.lua:210 in (field) GenerateTreasure (Lua) <175-238>
pt = (512.54, 0.00, -786.01)
overrideprefab = nil
spawn_as_empty = nil
postfn = nil
prefab = sunkenchest
treasure = 161623 - sunkenchest (valid:true)
x = 512.53544921246
y = 0
z = -786.0101888236
lootpreset = table: 000000007620EA20
prefabstospawn = table: 0000000051D83DC0
item = nil
_container = table: 000000007627EA70
i = 1
itemprefab = cookingrecipecard
scripts/components/messagebottlemanager.lua:195 in (method) UseMessageBottle (Lua) <182-225>
self =
OnSave = function - scripts/components/messagebottlemanager.lua:231
GetHermitCrab = function - scripts/components/messagebottlemanager.lua:162
active_treasure_hunt_markers = table: 000000000BB700B0
player_has_used_a_bottle = table: 000000000BB70380
hermitcrab = 105004 - hermitcrab(LIMBO) (valid:true)
GetPlayerHasUsedABottle = function - scripts/components/messagebottlemanager.lua:178
UseMessageBottle = function - scripts/components/messagebottlemanager.lua:182
inst = 100029 - world (valid:true)
OnLoad = function - scripts/components/messagebottlemanager.lua:245
SetPlayerHasUsedABottle = function - scripts/components/messagebottlemanager.lua:174
hermit_has_been_found_by = table: 000000000BB70290
SetPlayerHasFoundHermit = function - scripts/components/messagebottlemanager.lua:166
GetPlayerHasFoundHermit = function - scripts/components/messagebottlemanager.lua:170
bottle = 160857 - messagebottle(LIMBO) (valid:true)
doer = 124314 - wathgrithr (valid:true)
is_not_from_hermit = nil
hermitcrab = 105004 - hermitcrab(LIMBO) (valid:true)
pos = (512.54, 0.00, -786.01)
reason = nil
num_active_hunts = 0
scripts/prefabs/messagebottle.lua:40 in (field) gettargetfn (Lua) <35-42>
inst = 160857 - messagebottle(LIMBO) (valid:true)
doer = 124314 - wathgrithr (valid:true)
scripts/components/mapspotrevealer.lua:38 in (method) RevealMap (Lua) <25-69>
self =
prerevealfn = function - scripts/prefabs/messagebottle.lua:87
open_map_on_reveal = true
inst = 160857 - messagebottle(LIMBO) (valid:true)
gettargetfn = function - scripts/prefabs/messagebottle.lua:35
doer = 124314 - wathgrithr (valid:true)
scripts/actions.lua:2751 in (field) fn (Lua) <2737-2760>
act = Read nil With Inv: 160857 - messagebottle(LIMBO) (valid:true)
target = 124314 - wathgrithr (valid:true)
scripts/bufferedaction.lua:26 in (method) Do (Lua) <22-36>
self (valid:true) =
action = table: 000000005D2B4690
invobject = 160857 - messagebottle(LIMBO) (valid:true)
onfail = table: 000000006FEB4ED0
doerownsobject = false
rotation = 0
onsuccess = table: 000000006FEBD490
options = table: 000000006FEB7E00
doer = 124314 - wathgrithr (valid:true)
scripts/entityscript.lua:1552 in (method) PerformBufferedAction (Lua) <1534-1567>
self (valid:true) =
_PostActivateHandshakeState_Client = 0
GetMoistureRateScale = function - scripts/prefabs/player_common.lua:254
SetCameraDistance = function - scripts/prefabs/player_common.lua:1489
CanSeePointOnMiniMap = function - scripts/prefabs/player_common_extensions.lua:887
skeleton_prefab = skeleton_player
EnableBoatCamera = function - scripts/prefabs/player_common.lua:904
MakeGenericCommander = function - scripts/prefabs/player_common_extensions.lua:898
IsOverheating = function - scripts/prefabs/player_common.lua:224
IsActing = function - scripts/prefabs/player_common_extensions.lua:939
Light = Light (000000003BEA08C0)
defense = 1
ApplySkinOverrides = function - scripts/prefabs/player_common.lua:1646
ResetMinimapOffset = function - scripts/prefabs/player_common.lua:1473
ApplyScale = function - scripts/prefabs/player_common.lua:1584
SetGhostMode = function - scripts/prefa
[01:36:25]: [string "scripts/messagebottletreasures.lua"]:210: attempt to index local 'item' (a nil value)
LUA ERROR stack traceback:
scripts/messagebottletreasures.lua:210 in (field) GenerateTreasure (Lua) <175-238>
scripts/components/messagebottlemanager.lua:195 in (method) UseMessageBottle (Lua) <182-225>
scripts/prefabs/messagebottle.lua:40 in (field) gettargetfn (Lua) <35-42>
scripts/components/mapspotrevealer.lua:38 in (method) RevealMap (Lua) <25-69>
scripts/actions.lua:2751 in (field) fn (Lua) <2737-2760>
scripts/bufferedaction.lua:26 in (method) Do (Lua) <22-36>
scripts/entityscript.lua:1552 in (method) PerformBufferedAction (Lua) <1534-1567>
scripts/stategraphs/SGwilson.lua:6662 in (field) ontimeout (Lua) <6654-6663>
scripts/stategraph.lua:647 in (method) UpdateState (Lua) <633-677>
scripts/stategraph.lua:703 in (method) Update (Lua) <696-722>
scripts/stategraph.lua:128 in (method) Update (Lua) <109-146>
scripts/update.lua:288 in () ? (Lua) <224-298>
I think the fix is to have a ~= nil check if the item exists
Steps to Reproduce
have a sunken treasure spawn with message in a bottle, but a loot item doesn't exist
A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.
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