Don't Starve Together

Don't Starve Together

Tea and trees plus!
Fafnir 14 Jul, 2018 @ 11:29am
crash log
Hey, my game crashed out of the blue while a tea plant wasn't even on screen. I have the error part of my game log, though. I would have made this a comment, but the text wouldn't fit in a comment box. Thank you for what you do with this mod, it really enhances and lightens up the whole game for me.

[00:56:17]: [string "../mods/workshop-1416783578/scripts/prefabs..."]:27: attempt to compare number with nil
LUA ERROR stack traceback:
../mods/workshop-1416783578/scripts/prefabs/tea_plant.lua:27 in (field) makefullfn (Lua) <26-39>
inst = 122545 - tea_plant (valid:true)
scripts/components/pickable.lua:347 in (method) Regen (Lua) <341-351>
self =
ontransplantfn = function - ../mods/workshop-1416783578/scripts/prefabs/tea_plant.lua:83
onregenfn = function - ../mods/workshop-1416783578/scripts/prefabs/tea_plant.lua:16
inst = 122545 - tea_plant (valid:true)
numtoharvest = 3
transplanted = false
targettime = 2442.4333355464
task = PERIODIC 122545: 2400.000000
regentime = 2400
picksound = dontstarve/wilson/shave_LP
onpickedfn = function - ../mods/workshop-1416783578/scripts/prefabs/tea_plant.lua:69
max_cycles = 4
baseregentime = 2400
droppicked = true
product = tealeaves
makefullfn = function - ../mods/workshop-1416783578/scripts/prefabs/tea_plant.lua:26
wildfirestarter = false
paused = false
makeemptyfn = function - ../mods/workshop-1416783578/scripts/prefabs/tea_plant.lua:41
makebarrenfn = function - ../mods/workshop-1416783578/scripts/prefabs/tea_plant.lua:56
dropheight = 2.5
_ = table: 933E02A0
pause_time = 0
scripts/components/pickable.lua:83 in (field) fn (Lua) <82-84>
inst = 122545 - tea_plant (valid:true)
scripts/scheduler.lua:177 in (method) OnTick (Lua) <155-207>
self =
running = table: 0D37B380
waitingfortick = table: 0D37B7E0
tasks = table: 0D37B538
waking = table: 4796B070
attime = table: 0D37B420
hibernating = table: 0D37B3A8
tick = 73272
k = PERIODIC 122545: 2400.000000
v = true
already_dead = false
scripts/scheduler.lua:371 in (global) RunScheduler (Lua) <369-377>
tick = 73272
scripts/update.lua:170 in () ? (Lua) <149-228>
dt = 0.033333335071802
tick = 73272
i = 73272

[00:56:18]: [string "../mods/workshop-1416783578/scripts/prefabs..."]:27: attempt to compare number with nil
LUA ERROR stack traceback:
../mods/workshop-1416783578/scripts/prefabs/tea_plant.lua:27 in (field) makefullfn (Lua) <26-39>
scripts/components/pickable.lua:347 in (method) Regen (Lua) <341-351>
scripts/components/pickable.lua:83 in (field) fn (Lua) <82-84>
scripts/scheduler.lua:177 in (method) OnTick (Lua) <155-207>
scripts/scheduler.lua:371 in (global) RunScheduler (Lua) <369-377>
scripts/update.lua:170 in () ? (Lua) <149-228>

[00:57:35]: Force aborting...
< >
Showing 1-10 of 10 comments
Benzoquinone  [developer] 18 Jul, 2018 @ 1:25am 
Thank you for the log. I think I fixed the problem. Please let me know.
sorry for writing here, for some reason i can't post in the thread (you can delete this if it bothers you) just wanted to request, could you please add whimsy to this mod so I don't have to use this one and the regular tea and trees? I think the normal one is overriding the plus one, sometimes when i worldgen i get the hedges but i haven't seen a fruitling in ages, the mango trees and tea bushes look like in the basic one not the ones shown in screenshots here only and i can't even spawn them with the console
Fafnir 15 Sep, 2018 @ 1:25pm 
Brand new crash log! Yay!

[00:13:13]: [string "../mods/workshop-1416783578/scripts/prefabs..."]:28: attempt to compare number with boolean
LUA ERROR stack traceback:
../mods/workshop-1416783578/scripts/prefabs/tea_plant.lua:28 in (field) makefullfn (Lua) <26-41>
scripts/components/pickable.lua:347 in (method) Regen (Lua) <341-351>
scripts/components/pickable.lua:83 in (field) fn (Lua) <82-84>
scripts/scheduler.lua:177 in (method) OnTick (Lua) <155-207>
scripts/scheduler.lua:371 in (global) RunScheduler (Lua) <369-377>
scripts/update.lua:170 in () ? (Lua) <149-228>
originalmaja 12 Dec, 2018 @ 8:43pm 
This is still happening:

[00:04:08]: [string "../mods/workshop-1416783578/scripts/prefabs..."]:18: attempt to concatenate field 'preferedfruit' (a nil value)
LUA ERROR stack traceback:
../mods/workshop-1416783578/scripts/prefabs/fruitlings.lua:18 in (field) fn (Lua) <16-22>
inst = 112898 - mangoling (valid:true)
x = 132.52351379395
y = 0
z = 207.08837890625
scripts/scheduler.lua:177 in (method) OnTick (Lua) <155-207>
self =
running = table: 185F5DA0
waitingfortick = table: 185F5C38
tasks = table: 185F5B48
waking = table: 77D52160
attime = table: 185F5EB8
hibernating = table: 185F5D28
tick = 2596
k = PERIODIC 112898: 2.000000
v = true
already_dead = false
scripts/scheduler.lua:371 in (global) RunScheduler (Lua) <369-377>
tick = 2596
scripts/update.lua:170 in () ? (Lua) <149-228>
dt = 0.033333335071802
tick = 2596
i = 2596

[00:04:08]: [string "../mods/workshop-1416783578/scripts/prefabs..."]:18: attempt to concatenate field 'preferedfruit' (a nil value)
LUA ERROR stack traceback:
../mods/workshop-1416783578/scripts/prefabs/fruitlings.lua:18 in (field) fn (Lua) <16-22>
scripts/scheduler.lua:177 in (method) OnTick (Lua) <155-207>
scripts/scheduler.lua:371 in (global) RunScheduler (Lua) <369-377>
scripts/update.lua:170 in () ? (Lua) <149-228>

[00:04:08]: Warning: Widget:SetFocusFromChild is happening on a widget outside of the screen/widget hierachy. This will cause focus moves to fail. Is ScriptErrorWidget not a screen?
[00:04:08]: stack traceback:
scripts/widgets/widget.lua:602 in (method) SetFocusFromChild (Lua) <599-624>
scripts/widgets/widget.lua:649 in (method) SetFocus (Lua) <626-658>
scripts/widgets/scripterrorwidget.lua:107 in (method) OnUpdate (Lua) <102-119>
scripts/update.lua:90 in () ? (Lua) <33-129>
[00:04:09]: Warning: Widget:SetFocusFromChild is happening on a widget outside of the screen/widget hierachy. This will cause focus moves to fail. Is ScriptErrorWidget not a screen?
[00:04:09]: stack traceback:
scripts/widgets/widget.lua:602 in (method) SetFocusFromChild (Lua) <599-624>
scripts/widgets/widget.lua:621 in (method) SetFocusFromChild (Lua) <599-624>
scripts/widgets/widget.lua:621 in (method) SetFocusFromChild (Lua) <599-624>
scripts/widgets/widget.lua:621 in (method) SetFocusFromChild (Lua) <599-624>
scripts/widgets/widget.lua:649 in (method) SetFocus (Lua) <626-658>
scripts/widgets/scripterrorwidget.lua:107 in (method) OnUpdate (Lua) <102-119>
scripts/update.lua:90 in () ? (Lua) <33-129>
[00:04:12]: Force aborting...

Context:

small DST world. endless. one mod. this mod. attacking a fruitling, or what its called.
Last edited by originalmaja; 12 Dec, 2018 @ 8:43pm
76561198200227939 17 Jan, 2019 @ 1:34pm 
Hey there! logn time fan of this mod, i've been using it no problem on my world for over 220 days but this end of summer i started getting the following error nonstop, only stopped when i disabled it.

I think it's related to how withered the plans are in summer and then get rehydrated again.

{LINK REMOVED}

I really love mangoes, please help fix this so i can put them back in the world ;_;
Pomidory 26 Jun, 2019 @ 7:34am 
I think i found solution to problem observed by @Fafnya

Originally posted by Fafnya ☆:
Brand new crash log! Yay!

[00:13:13]: [string "../mods/workshop-1416783578/scripts/prefabs..."]:28: attempt to compare number with boolean
LUA ERROR stack traceback:
../mods/workshop-1416783578/scripts/prefabs/tea_plant.lua:28 in (field) makefullfn (Lua) <26-41>
scripts/components/pickable.lua:347 in (method) Regen (Lua) <341-351>
scripts/components/pickable.lua:83 in (field) fn (Lua) <82-84>
scripts/scheduler.lua:177 in (method) OnTick (Lua) <155-207>
scripts/scheduler.lua:371 in (global) RunScheduler (Lua) <369-377>
scripts/update.lua:170 in () ? (Lua) <149-228>

I've expirenced it myself.
1. Go to C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\mods folder
2. Search for tea_plant.lua and open it (it can be notepad if you dont have anything for coding)
3. Make sure you make backup copy of this file. Now is the best part:
a) after
local function makefullfn(inst) if inst.components.pickable.cycles_left ~= nil then
in the new line put
if (type(inst.components.pickable.cycles_left) == 'boolean') then inst.components.pickable.cycles_left = 1; end
b) change
local function tree_onsave(inst, data) data.isdonewinter = inst.isdonewinter ~= nil data.pickablecycles = inst.pickablecycles ~= nil end
to
local function tree_onsave(inst, data) data.isdonewinter = inst.isdonewinter ~= nil data.pickablecycles = inst.pickablecycles end
c) change
local function tree_onload(inst, data) if data ~= nil then if data.pickablecycles then inst.components.pickable.cycles_left = data.pickablecycles end
to
local function tree_onload(inst, data) if data ~= nil then if data.pickablecycles then if (type(data.pickablecycles) == 'boolean') then inst.components.pickable.cycles_left = 1 else inst.components.pickable.cycles_left = data.pickablecycles end
That worked for me.
nil 31 Jul, 2019 @ 8:48am 
Originally posted by A. Macierewicz:
I think i found solution to problem observed by @Fafnya

Originally posted by Fafnya ☆:
Brand new crash log! Yay!

[00:13:13]: [string "../mods/workshop-1416783578/scripts/prefabs..."]:28: attempt to compare number with boolean
LUA ERROR stack traceback:
../mods/workshop-1416783578/scripts/prefabs/tea_plant.lua:28 in (field) makefullfn (Lua) <26-41>
scripts/components/pickable.lua:347 in (method) Regen (Lua) <341-351>
scripts/components/pickable.lua:83 in (field) fn (Lua) <82-84>
scripts/scheduler.lua:177 in (method) OnTick (Lua) <155-207>
scripts/scheduler.lua:371 in (global) RunScheduler (Lua) <369-377>
scripts/update.lua:170 in () ? (Lua) <149-228>

I've expirenced it myself.
1. Go to C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\mods folder
2. Search for tea_plant.lua and open it (it can be notepad if you dont have anything for coding)
3. Make sure you make backup copy of this file. Now is the best part:
a) after
local function makefullfn(inst) if inst.components.pickable.cycles_left ~= nil then
in the new line put
if (type(inst.components.pickable.cycles_left) == 'boolean') then inst.components.pickable.cycles_left = 1; end
b) change
local function tree_onsave(inst, data) data.isdonewinter = inst.isdonewinter ~= nil data.pickablecycles = inst.pickablecycles ~= nil end
to
local function tree_onsave(inst, data) data.isdonewinter = inst.isdonewinter ~= nil data.pickablecycles = inst.pickablecycles end
c) change
local function tree_onload(inst, data) if data ~= nil then if data.pickablecycles then inst.components.pickable.cycles_left = data.pickablecycles end
to
local function tree_onload(inst, data) if data ~= nil then if data.pickablecycles then if (type(data.pickablecycles) == 'boolean') then inst.components.pickable.cycles_left = 1 else inst.components.pickable.cycles_left = data.pickablecycles end
That worked for me.

Pardon. I think
inst.pickablecycles ~= nil
change to no "~=nill" is somehow weird. I didn't indicate you are weird but that I just can't understand. Because there's a definition called
inst.isdonewinter = nil inst.pickablecycles = nil
And isn't that definition useless if you delete the "~=nil" only behind the "pickablecycles"? :steambored:
Last edited by nil; 31 Jul, 2019 @ 8:57am
Pomidory 10 Aug, 2019 @ 12:52pm 
data.pickablecycles = inst.pickablecycles ~= nil
makes
data.pickablecycles a Boolean
and then its passed to
inst.components.pickable.cycles_left
which should be Number

I dont write extensions for games myself but im frontend developer so with little expirence in programing I drove in to the conclusion that:

inst.pickablecycles should be Number and in tree_onsave function it should save the last known number.
If it saves boolean then it loads boolean in tree_onload and pass it to inst.components.pickable.cycles_left then in the makefullfn function it cant handle boolean under that property so game crashes!

Maybe not all of my code is necessary but it helped me so i didnt investigate further.

This is what happens when you write extensions for game in ♥♥♥♥♥♥ programming language without proper type checkers.




nil 18 Aug, 2019 @ 8:04pm 
Originally posted by A. Macierewicz:
data.pickablecycles = inst.pickablecycles ~= nil
makes
data.pickablecycles a Boolean
and then its passed to
inst.components.pickable.cycles_left
which should be Number

I dont write extensions for games myself but im frontend developer so with little expirence in programing I drove in to the conclusion that:

inst.pickablecycles should be Number and in tree_onsave function it should save the last known number.
If it saves boolean then it loads boolean in tree_onload and pass it to inst.components.pickable.cycles_left then in the makefullfn function it cant handle boolean under that property so game crashes!

Maybe not all of my code is necessary but it helped me so i didnt investigate further.

This is what happens when you write extensions for game in ♥♥♥♥♥♥ programming language without proper type checkers.

OK...Thank you for reply. (-: And sorry for replying to you too late. |-':
< >
Showing 1-10 of 10 comments
Per page: 1530 50