I am attempting to create a plugin that will suit my needs very well, but I am running into trouble as I have never dealt with creating a plugin that can read a notetag, or in this particular case, part of the data that does not have a notetag (Animations).
What I am attempting to do is have a notetag that the user will put at the end of the Animation's name, and have it read back two to four values in it, separated by comma.
Those values would be integers.
The error I keep getting so far, trying to get it to read just one value in that tag, is this:
This is the code so far, I am just trying to get it to print back to the console any Animations which have the tag in their name, to start. I used 7 in the slice part because "name" is the 7th value in the array in the Animations.json data file. I have also used 6 in the event that the first value (id) is actually 0 and not 1. Same result.
Any insight into where I am going wrong here would be awesome, so I can continue to try to figure the rest of this out on my own.
What I am attempting to do is have a notetag that the user will put at the end of the Animation's name, and have it read back two to four values in it, separated by comma.
JavaScript:
<test:w,x,y,z>
Those values would be integers.
The error I keep getting so far, trying to get it to read just one value in that tag, is this:
Code:
Invalid regular expression: Nothing to repeat
This is the code so far, I am just trying to get it to print back to the console any Animations which have the tag in their name, to start. I used 7 in the slice part because "name" is the 7th value in the array in the Animations.json data file. I have also used 6 in the event that the first value (id) is actually 0 and not 1. Same result.
Any insight into where I am going wrong here would be awesome, so I can continue to try to figure the rest of this out on my own.
JavaScript:
'use strict';
/<test:*\d*>/;
$dataAnimations.slice(7).forEach(function(name) {
'use strict';
let note = /<test:*\d*>/.exec(name);
if(note !== null) {
console.log(note);
}
});