Package ch.njol.skript.log

Examples of ch.njol.skript.log.ParseLogHandler.printError()


            }
            b += a;
            continue outer;
          }
        }
        log.printError();
        return null;
      }
     
//      String lastExpr = expr;
//      int end = expr.length();
View Full Code Here


    try {
      final Matcher m = functionCallPattern.matcher(expr);
      if (m.matches()) {
        if ((flags & PARSE_EXPRESSIONS) == 0) {
          Skript.error("Functions cannot be used here.");
          log.printError();
          return null;
        }
        final String functionName = "" + m.group(1);
        final Function<?> function = Functions.getFunction(functionName);
        if (function == null) {
View Full Code Here

        }
        final String functionName = "" + m.group(1);
        final Function<?> function = Functions.getFunction(functionName);
        if (function == null) {
          Skript.error("The function '" + functionName + "' does not exist");
          log.printError();
          return null;
        }
        final String args = m.group(2);
        final List<Expression<?>> params = new ArrayList<Expression<?>>();
        if (args.length() != 0) {
View Full Code Here

          int j = 0;
          for (int i = 0; i != -1 && i <= args.length(); i = next(args, i, context)) {
            if (i == args.length() || args.charAt(i) == ',') {
              final Expression<?> e = new SkriptParser("" + args.substring(j, i).trim(), flags | PARSE_LITERALS, context).parseExpression(function.getParameter(p).getType().getC());
              if (e == null) {
                log.printError("Can't understand this expression: '" + args.substring(j, i) + "'", ErrorQuality.NOT_AN_EXPRESSION);
                return null;
              }
              params.add(e);
              j = i + 1;
            }
View Full Code Here

          }
        }
        @SuppressWarnings("null")
        final FunctionReference<T> e = new FunctionReference<T>(functionName, SkriptLogger.getNode(), types, params.toArray(new Expression[params.size()]));
        if (!e.validateFunction(true)) {
          log.printError();
          return null;
        }
        log.printLog();
        return e;
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.