Hello,
I used this website to generate the url below: Main Page | henrikdev.xyz
When I try to utilise this command in my chat:
@$(user), $(eval m='$(urlfetch json https://api.henrikdev.xyz/valorant/v1/mmr-history/na/lebronze%20james/nba2k)';r=JSON.parse(m);t=0;h=new Date().getHours();p=new Date().getDate();a=0;b=0;for(i=0;i<17;i++){d=r.data[i].date;s=d.indexOf(",",d.indexOf(",")+1);d=d.substring(s-2,s);n=r.data[i].mmr_change_to_last_game;if(h>16&&d>p){d=p;}if(p==d&&n>0){t+=n;a++;}else if(p==d){t+=n;b++;}}g="jamie is ";if(t>0){g+="UP ";}else{g+="DOWN ";}g+=t+"RR"+a+"-"+b+" ";g;)
I receive and error saying:
@Nutty Squid , Cannot read properties of undefined (reading 'date')
I'm assuming there's an error in this portion of the code:
{d=r.data[i].date;s=d.indexOf(",",d.indexOf(",")+1);d=d.substring(s-2,s);n=r.data[i].mmr_change_to_last_game;if(h>16&&d>p){d=p;}
But I don't know how to go about fixing it.