[solved] Getting a value from a notetag

I have item 1 with the notetag: <scrap_glass: 3>

I'm trying to use this code in a script call (simplified version):

$gameParty.gainItem($dataItems[10], $dataItems[1].meta.scrap_glass);It's not working. What am I doing wrong? I could only find a few threads on notetags, but that's the code people gave. Does this not work in a script call, or do I just have a dumb mistake in the notetag code?
$gameParty.gainItem($dataItems[10], Number($dataItems[1].meta.scrap_glass));
Thank you! I knew it was something dumb that I was missing. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/solved-getting-a-value-from-a-notetag.53539/