diff --git a/core/src/me/vinceh121/wanderer/ConsoleHandler.java b/core/src/me/vinceh121/wanderer/ConsoleHandler.java index 3be125d..ca7bb2a 100644 --- a/core/src/me/vinceh121/wanderer/ConsoleHandler.java +++ b/core/src/me/vinceh121/wanderer/ConsoleHandler.java @@ -58,10 +58,12 @@ private void run() { new JsGame(this.game).install(this.scope); this.fillConsoleScope(this.scope); + int lineNo = 1; + while (!this.closed) { try { final String line = this.lineReader.readLine("Wanderer> "); - final Object res = this.jsContext.evaluateString(this.scope, line, "", -1, null); + final Object res = this.jsContext.evaluateString(this.scope, line, "", lineNo++, null); System.out.println(ScriptRuntime.toString(res)); } catch (final EcmaError e) { ConsoleHandler.LOG.error("", e);