#I suck at this mod (CreateJS)

6 messages · Page 1 of 1 (latest)

hearty wave
#

So I'm trying to use CreateJS to add a recipe to make a currency system (which i have made work), and also add recipes to a skilltree mod, but it isn't working. I keep getting the error "customRecipes.js#10: Error loading KubeJS script: server_scripts:customRecipes.js':missing } after property list", and I'm not sure why.
ServerEvents.recipes(event => { event.recipes.create.mechanical_crafting('skilltree:wisdom_scroll', [ 'DU UD', 'UDQFRDU', ' DNNND ', ' DNAND ', ' DRFQD ' ], { D: 'projecte:dark_matter', U: 'mekanism:ultimate_control_circuit', Q: 'bigger_ae2:digital_singularity_cell_component', F: 'projecte:klein_star', R: 'projecte:red_matter', A: 'skilltree:amnesia_scroll', N: 'rainbowcompound:netherstar_ingot' })
Other scripts were too long to add because character limit XD

lilac hollyBOT
#

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

mental bisonBOT
#

You can write your code in a codeblock by typing it between the codeblock delimiters:
Note that these are backticks, not apostrophes

```js :arrow_left:

ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})

``` :arrow_left:

This example will look like this:

ServerEvents.recipes(event => {
  event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
lyric moth
#

you should use a code editor, it will tell you what the problem is
you forgot to close the brackets from the start

ServerEvents.recipes(event => {
  event.recipes.create.mechanical_crafting('skilltree:wisdom_scroll', [
    'DU   UD',
    'UDQFRDU',
    ' DNNND ',
    ' DNAND ',
    ' DRFQD '
  ], {
    D: 'projecte:dark_matter',
    U: 'mekanism:ultimate_control_circuit',
    Q: 'bigger_ae2:digital_singularity_cell_component',
    F: 'projecte:klein_star',
    R: 'projecte:red_matter',
    A: 'skilltree:amnesia_scroll',
    N: 'rainbowcompound:netherstar_ingot'
  })
})
mental bisonBOT
#

If you're working with KubeJS scripts, config files, or similar things, we generally recommend using an actual IDE rather than just Notepad++ and its various siblings.
In a lot of cases, it can help you find errors in your code faster and also gives you neat features like syntax highlighting, automatic formatting, etc!
We recommend Visual Studio Code, since it's lightweight(-ish) and works very well with JavaScript files out-of-the-box.