Skip to content

Commit

Permalink
added missing break causing a "s" instruction to spit out an unknown …
Browse files Browse the repository at this point in the history
…instruction error, and fixed the missing new lines in error text
  • Loading branch information
aspwil committed Dec 6, 2020
1 parent 6143cd0 commit 305f9f1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/ndballsim/Simulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static void run(String file, int max, boolean doLog, boolean step, boolea

}
//throw an error if there is no hashmap key
if(startPos.get(ball.getHighestDim()) == null){
if (startPos.get(ball.getHighestDim()) == null) {
error("Traveled into a new highest dimension (" + movement[0] + ") that does not have any instructions");
}

Expand Down Expand Up @@ -272,17 +272,17 @@ public static void run(String file, int max, boolean doLog, boolean step, boolea
newVal = (int) instrs[i].info[0];
instrs[i].info[0] = ballVal;
ballVal = newVal;

break;
//the parcer spit out an unknown instruction
default:
error("Unkown Internal Instruction.\n"
+ "This means the parcer spit out an instruction with an unknown name\n"
+ "this should have been caught earlier by the parcer"
+ "the error message means that \"I\" messed up in some way"
error("Unknown Internal Instruction.\n"
+ "This means the parser spit out an instruction with an unknown name\n"
+ "this should have been caught earlier by the parcer\n"
+ "the error message means that \"I\" messed up in some way\n"
+ "if you see this please open an issue on the Github page\n"
+ "include a copy of your code, what version of the NDBallSim this error occured on"
+ "and the name of the instruction given on the next line "
+ "Instruction name:\"" + instrs[i].name + "\"");
+ "include a copy of your code, what version of the NDBallSim this error occured on\n"
+ "and the name of the instruction given on the next line\n"
+ "Instruction name: \"" + instrs[i].name + "\"");

}
}
Expand Down

0 comments on commit 305f9f1

Please sign in to comment.