1.15.1 ct 6.0.0.3 Type Error in comment line
Knito58 opened this issue ยท 9 comments
Intro:
Trying to make a second recipe for car:blastfurnace where the primary recipe is being overwritten by wtbw:iron_furnace
Issue Description:
Get a type error in line 1 of the zs script, where the line starts with a # comment
What happens:
error
What you expected to happen:
some other error as i am new to crafttweaker
Script used
crafttweaker.log file
Affected Versions:
- Minecraft: 1.15.1
- Forge: 30.026
- Crafttweaker: 6.0.0.3
- Using a server: No
Your most recent log file where the issue was present:
[pastebin/gist/etc link here]
Rewrite your file (no copy-pasting!) and see if it works then.
It is possible that you have a control character (an invisible character) at the beginning of your script.
Also, I recommend to use //
not #
for comments, as #
are compiler comments and can change your scripts in some cases.
I think a number of programs break on files encoded as UTF8 with BOM, so check the encoding too. In Notepad++, the menu bar has an entry for it. Set it to plain UTF-8
(and maybe also hit Convert to UTF-8
in there too) and see if that helps.
Fix the other issues in your script first:
line 13:
recipes
does no longer exist, it's nowcraftingTable
addshaped
needs to beaddShaped
- Recipes need a name
<car:blastfurnace>
needs to be<item:car:blastfurnace>
Thank you for caring. I rewrote it from scratch as car_blastfurnace4.zs and changed the coding to "UTF-8 without BOM". The comment lines were converted into a multi line comment.
https://pastebin.com/H1a5PzZV
The crafttweaker.log seems now to point out the first bracket of the var def section.
https://pastebin.com/UpWpFGLM
Am I missing to include some module?
Well, that's the other issues in your script:
In CT 1.14+ it's no longer <minecraft:iron_ingot>
but <item:minecraft:iron_ingot>
Check /ct hand
while holding the item for the syntax, but essentially you prefix item:
/ct hand is a great helper command. Thanks for implementing that one.
I changed the items with item: https://pastebin.com/x3WTbeqm and now there is a really easy one (should be):
There's a missing ";" in line 16. But it is there. crafttweaker.log: https://pastebin.com/ADewandP
I put another 4 ";;;;" after the one that was already there and yes, still it sees no semicolon. "car_blastfurnace4.zs:16:13: ; expected"
The position 13 is right before the closing ")". I will not put a semicolon there, will I?
Thanks alot! That worked.
At the end there were even some helpful error messages like "Given name does not fit the regex". Took again some restarts until I understood "no capital letters" in the name.
Thank you very much. Will try to put this on my server.
Just to add one more thing:
in 1.14+ CrT will load scripts when recipes are synced.
That means it will load scripts when you issue the command /reload
.
You don't need to restart the game to see if your changes work ^^