Hello hklotz13,
Could you please edit your post and format your code by clicking this button: </> Thank you.
When you do this:
for(int i = 0; i < spotify.size(); i++){
...
}
You are declaring the variable i as an int in the scope of your for loop.
As soon as you get out of the for loop, that variable i does not exist anymore.
So when your do rect(50*i,height,-40,-100); after you for loop the program doesn’t know what value i should be. And neither do you actually =)
For the second error, it happens on this line:
JSONObject thisTrack = spotify.getJSONObject(i);
As declared in your for loop, i is an integer. So you are calling the function getJSONObject and giving it an integer.
The error you have is simply telling you that you can’t do that because this function was never defined. The only one that was defined was the one where you would give a String instead of an integer