Datapack's loaded but isn't not working

Hey everyone! 👋

I’m working on a Minecraft 1.21/NeoForge server using Iron’s Spells ‘n Spellbooks, and I’m trying to create a school-based magic system. Here’s the setup:

Players get randomly assigned a magic school when they join (fire, ice, lightning, holy, etc.).

Once a school is assigned, players can only cast spells from that school. Trying to use other schools’ spells should cancel the cast with a RP-flavored message.

The eldritch school is special — it can’t be given randomly, only via admin commands.

I’m using two systems together:

Datapack → handles the random school assignment, adds players to teams (fire_school, ice_school, …), and triggers messages & advancements.

KubeJS script → enforces spell restrictions by checking the player’s team whenever they try to cast a spell.

Basically: the datapack gives the school (and sets teams/advancements), and KubeJS blocks spells from other schools.

Right now I’m stuck because I can get the datapack to load, but running /function schoolsys:setup always says “unknown function.” I want to make sure the datapack and KubeJS scripts work together smoothly. Also it seems that the custom advancement I made arent also loading which is also strange.

Anyone think they can help me figure all this out ? (I've put both the datapack in a .zip and the KubeJS script (for those wondering which mod are used I can also send the modpack if necessary)

Continue to help post