Hey guys,
I have this problem with a little search script im working on, in rpg maker mv:
example function call:
basically, im replacing "$dataMap.events.name", with "location.category". But I cant seem to get the code to recognize the string inside "category" as a (sub variable?, im not sure what its called). How would I fix this problem?
Thanks in advance!
I have this problem with a little search script im working on, in rpg maker mv:
Code:
function searchCategory(term, category, location) {
for (let i = 1; i < location.length; i++) {
if (location[i].category === term)
return location[i];
}
return false;
};
example function call:
Code:
searchCategory("THISEVENTSNAME", "name", $dataMap.events);
basically, im replacing "$dataMap.events.name", with "location.category". But I cant seem to get the code to recognize the string inside "category" as a (sub variable?, im not sure what its called). How would I fix this problem?
Thanks in advance!