diff --git a/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java b/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java index 79c19bf60..995a326e9 100644 --- a/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java +++ b/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java @@ -202,7 +202,7 @@ public class SpeakerPeripheral implements IPeripheral { if (arguments.length > 2) { - if (!(arguments[1] instanceof Double)) // Arg wrong type + if (!(arguments[2] instanceof Double)) // Arg wrong type { throw new LuaException("Expected string, number (optional), number (optional)"); }