cannot use subtract in script
C4J3 opened this issue ยท 6 comments
Issue Description:
Not sure if my syntax is off but I'm trying to make a script have the function of removing the mekansim crusher recipes for metal dusts then add them back in as TF dusts. I did this with item definitions and simple maths operation (input is i, output is i-64) but I get a missing bracket error.
What happens:
i I use i+64 (literally only changing the '-' to a '+' I get no errors and the script works (that is my current solution making my range 64 less then having the function do (i+64 makes i) otherwise I get:
[SERVER_STARTED][SERVER][ERROR] [crafttweaker | SIDE_CLIENT]: Error parsing custom.zs:45 -- ) expected
What you expected to happen:
no error and the script to work
Script used (Please Pastebin or gist your script, posting an unpasted or ungist'd script will automatically close this issue):
crafttweaker.log file (Please Pastebin or gist your file, posting an unpasted or ungist'd file will automatically close this issue):
Affected Versions (Do not use "latest"):
- Minecraft: 1.12.2
- Forge: 14.23.5.2847
- Crafttweaker: 4.1.19
- Using a server:
- If yes, does the client have the exact same scripts?
Your most recent log file where the issue was present:
[pastebin/gist/etc link here]
latest.log
updated initial post with it as well
Just do me a favour and replace:
mods.mekanism.crusher.addRecipe(tfIngotDef.makeStack(i+64), tfIngotDef.makeStack(i));
with:
mods.mekanism.crusher.addRecipe(tfIngotDef.makeStack(i - 64), tfIngotDef.makeStack(i));
basically space it out, and tell me if it works