Jump to content

Gingerbread Houses Crash


skittles sour
  • Fixed

Hi, so spawning a gingerbread house mid-game doesn't crash, but spawning one with a world-gen mod does:

[00:00:49]: [string "scripts/prefabs/gingerbreadhouse.lua"]:47: calling 'SetBuild' on bad self (string expected, got boolean)
LUA ERROR stack traceback:
    =[C]:-1 in (method) SetBuild (C) <-1--1>
    scripts/prefabs/gingerbreadhouse.lua:47 in (upvalue) sethousetype (Lua) <37-49>
    scripts/prefabs/gingerbreadhouse.lua:86 in (method) OnLoad (Lua) <85-87>
    scripts/entityscript.lua:1744 in (method) SetPersistData (Lua) <1725-1746>
    scripts/mainfunctions.lua:432 in (global) SpawnSaveRecord (Lua) <397-439>
    scripts/gamelogic.lua:665 in (upvalue) PopulateWorld (Lua) <392-701>
    scripts/gamelogic.lua:972 in (upvalue) DoInitGame (Lua) <859-1051>
    scripts/gamelogic.lua:1085 in (local) cb (Lua) <1079-1086>
    scripts/shardindex.lua:209 in (upvalue) OnLoadSaveDataFile (Lua) <191-210>
    scripts/shardindex.lua:226 in () ? (Lua) <225-227>
    =[C]:-1 in (method) GetPersistentStringInClusterSlot (C) <-1--1>
    scripts/shardindex.lua:225 in (method) GetSaveData (Lua) <218-239>

line 86 of the prefab should be changed from

local function OnLoad(inst, data)
	sethousetype(inst, data ~= nil and data.bank, data ~= nil and data.build)
end

to

local function OnLoad(inst, data)
	sethousetype(inst, data ~= nil and data.bank or nil, data ~= nil and data.build or nil)
end

 


Steps to Reproduce

spawn gingerbead house with worldgen mod

  • Thanks 1



User Feedback


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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...