UnifyTags

UnifyTags

3.2k Downloads

Error: “Assignment to undeclared variable invnames”

Nevrai opened this issue · 1 comments

commented

I’m getting this error from KubeJS. I didn’t change the script except for adding a comment at the top crediting you as well as putting // in front of Tech Reborn, Assembly Line Machines, Futurepack, Tinkers’ Construct, and Tinkers’ Reforged, as those mods are not installed. I also moved Thermal Series (thermal) to the top of the priority list.

[ERR ] Error loading KubeJS script: Assignment to undeclared variable invnames (server_scripts:unify.js#387)

The code in question (#387):

invnames = new Set([
    "net.minecraft.inventory.container.PlayerContainer",
    "net.minecraft.class_1723",
    "net.minecraft.world.inventory.InventoryMenu"
])

The server script that is erroring does not seem to be working either. Lead, tin, and uraniujm ores from FTB Industrial Contraptions are generating rather than Thermal Series or Mekanism ores, silver ore from Occultism is generating, and no ores that I give myself with a command are being replaced. The client script that hides items from JEI does appear to be working, and it even seems like Mekanism’s tin and lead ores, to name a couple, aren’t even loaded to the game, which I assume is the work of the start-up script. But the server script isn’t working.

Versions

  • Minecraft: 1.18.2
  • Forge: 40.1.80 (latest)
  • UnifyTags: 1.14 (latest)
  • KubeJS: 1802.5.5-build.546 (latest)
commented

put "let" before "invnames". So it becomes let invnames = new Set([

Fixed by bee897a