TableRow NullPointer

edited January 2017 in Questions about Code

My CSV file is all right AFAIK. So why does this:

Table states;
TableRow row;

void setup() {
  states = new Table();
  states = loadTable("states.csv", "header");
  TableRow row = states.getRow(0);
}

void draw() {
  println(row.getInt("sides"));
}

get me a NullPointerException?

Answers

Sign In or Register to comment.