#There is some error with my code and I don't know what and how to fix it.

23 messages · Page 1 of 1 (latest)

zealous vigil
#

I have this script, but there is an error. I don't quite understand the error. The error is the last one in the screenshot.

lone dustBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

real jewelBOT
#

Paste version of BorgorPam.js from @zealous vigil

real jewelBOT
#

[➤](#1410742253416218884 message)
those are just errors created by other mods who cant be bothered to make correct recipes, kubejs just picks up the errors and shows them
if you want them gone, just remove those erroring recipes by using the ID in the error message

zealous vigil
#

That I know, but if you look at the last error, it says it is comming from my script.

fallow ridge
#

for that:

real jewelBOT
#

Please send your KubeJS server log. It can be found at /minecraft/logs/kubejs/server.log.
If you are on 1.18 or 1.16 it will be called server.txt.
Please send the file directly, without links or snippets.

zealous vigil
real jewelBOT
#

Paste version of server.log from @zealous vigil

fallow ridge
#
server_scripts:Pam related/BorgorPam.js#57: Failed to create custom recipe from json {"type":"minecraft:smoking","category":"food","cookingtime":100,"experience":0,"ingredient":{"item":"kubejs:brioche_dough"},"results":[{"id":"pamhc2foodextended:briochebunitem"}]}: 

Recipe component key 'result' not found!
Valid keys: [result:item_stack, experience?:float<0.0,max>, category?:cooking_book_category, ingredient:ingredient, cookingtime?:ticks]

your recipe structure seems to be wrong, you need result, not results

zealous vigil
#

I had another error, and that one dissapeared when I changed it from result to results.

#

But ill try

real jewelBOT
#

Paste version of server.log from @zealous vigil

fallow ridge
#
server_scripts:Pam related/BorgorPam.js#57: Failed to create custom recipe from json {"type":"minecraft:smoking","category":"food","cookingtime":100,"experience":0,"ingredient":{"item":"kubejs:brioche_dough"},"result":[{"id":"pamhc2foodextended:briochebunitem"}]}:

Recipe component key 'result' not found!
Valid keys: [result:item_stack, experience?:float<0.0,max>, category?:cooking_book_category, ingredient:ingredient, cookingtime?:ticks]
#

result is singular, which usually means its not a list, just an item 😛

zealous vigil
#

I removed the brackets from the briochebunitem recipe and ill see if that removes the error

#

Or should I also remove the brackets if the results from the sequenced assemblies are single items?

fallow ridge
#

im just assuming thats what you have to do, you have to check the recipe on the mod's github or the jar file to see the proper recipe

zealous vigil
#

the errors are gone

#

there was another, non-sequenced assembly recipe, where I had results instead of result and removing the brackets there too fixed it.

#

Thanks!

#

such small things