#list error Index out of range exception

1 messages · Page 1 of 1 (latest)

mellow hemlock
#

so im trying to acces and show through a text every element of a string list, but i get this error
the code : for (int i = 0; i <= quests.Count - 1; i++) { objective.text += quests[i].objective[i] + "\n".ToString(); } check = true;
any tips?

undone rapids
#

@mellow hemlock I would take a look at the objective[i] part. what are you trying to do there?

crystal stratus
#

You'd probably want a different iterator, j, looping through objective

#

also, if a field is an array, please pluralize it, it makes it much easier to read