I'm trying to obtain a boolean in an array from the world, then convert it to a string, like this:
Here's the world code:
However I get a NullPointerException when attempting to run this code, and it points me to this line:
Does anyone know what I'm doing wrong? Would you like me to post more code?
private String getValue() { if (intOrBool == 0) { return "" + board.intSettings[intArrayValue]; } else if (intOrBool == 1) { return "" + board.boolSettings[boolArrayValue]; } else { return ""; } }
public boolean[] boolSettings = { true //attack effects };
return "" + board.boolSettings[boolArrayValue];