Page 1 of 1

Lua error

Posted: Thu Oct 25, 2018 21:53
by ElephantEthan
What am I doing wrong here?
Screenshot_20181025-215049.png

Code: Select all

function script.nextMonth()
      Builder.buildTree("$tree00", 1, 0, 0)
end

Re: Lua error

Posted: Thu Oct 25, 2018 22:52
by CommanderABab
Where did you define $tree00?

Re: Lua error

Posted: Fri Oct 26, 2018 7:46
by ElephantEthan
CommanderABab wrote:
Thu Oct 25, 2018 22:52
Where did you define $tree00?
It's the default tree ID. I don't have any plugins that replace it.

Re: Lua error

Posted: Sat Oct 27, 2018 8:23
by AnyBear65
I think you need to load draft first.

Re: Lua error

Posted: Sat Oct 27, 2018 16:58
by ElephantEthan
JustAnyone wrote:
Sat Oct 27, 2018 8:23
I think you need to load draft first.
Thanks! It works now!

Code:

Code: Select all

function script.nextMonth()
      Draft.getDraft("$tree00")
      Builder.buildTree("$tree00", 1, 0, 0)

end
Result:
Wiisera_18-10-27_16.56.38.png