Got error: cannot convert from hexagon to String

edited December 2013 in Questions about Code

I'd like to create a visualization: The data in heisserBadetag (heisserBadetag.csv exist in void setup()...) should visualize 19 hexagons that rotate clockwise. These 19 objects form a big hexagon. The hexagons are also in void setup() {}. Here's my code:

void draw() {
  background(0);
  for (int i = 0; i < hexagons.length; i++) {
    hexagons[i].display();
  }
  for (int i = 0; i < heisserBadetag.length; i++) {
    hexagons[i].display();
  }
}

at void draw() { I got that error. I need help!

Answers

  • Is it an out of bounds exception? if it is try:

    for (int i = 0; i < hexagons.length-1; i++) {
        hexagons[i].display();
    
  • Are you sure the error happens in the code you show?

    The problematic line should be highlighted in the PDE.

    Showing the remainder of the code (setup) can help, too.

Sign In or Register to comment.