CraftTweaker

CraftTweaker

151M Downloads

Error could not find scripts

Yarden-zamir opened this issue · 4 comments

commented

Issue Description:

I have two files, one is _Botania.zs and one is functions.zs. and when i call a function from the functions file using scripts.functions.test(); it says in the log ERROR: _Botania.zs:22 > could not find scripts

What happens:

The script crashes and throws an error (see log)

What you expected to happen:

I expect the function ( function test(){ print("test"); }) to be called as per the docs and print "test"

Script used

_Botania.zs.txt
functions.zs.txt
(I added .txt so that i can upload them here)

Minetweaker.log file (Please Pastebin or gist your file, posting an unpasted or ungist'd file will automatically close this issue):

crafttweaker.log


Affected Versions (Do not use "latest"):

  • Minecraft: 1.12.2
  • Forge: 14.23.2.2651
  • Crafttweaker: 4.1.6
  • modtweaker: 4.0.9

Your most recent log file where the issue was present:

latest.log

commented

Either rename your functions script or use a priority preprocessor.
Your botania script is executed before the functions scripts so latter cannot access the prior.

commented

Can I use folders for that? edit: iirc in the wiki it says they are loaded in "no particular order"

commented

Ok, I fixed it by adding the functions script into a folder called _first. Is there a better way to do this that will also look elegant? I don't like doing scripts._First.functions.test(); tho its only a pet peeve at this point. edit ok sorry i skipped the part where you say "or use a priority preprocessor" im gonna look into that

commented