private String[] readParameters(int index, int number, BasicVariables variables) throws ScriptException {
		prms.clear();
		int read = 0;
		
		StringBuilder string = new StringBuilder();
		int tokensN = 0;
		for(int i = index; i < types.length; i++) {
			
			int type = types[i];
			String token = tokens[i];
			
			if (type == TYPE_NEXT_PARAMETR) {
				String s2 = string.toString();
				if (tokensN > 1)
					s2 = Eval.eval(s2);
				prms.add(s2);
				string.delete(0, string.length());
				tokensN = 0;
				read++;
			} else {
				tokensN++;
				// difference between variable and function;
				if (type == TYPE_VARIABLE) {
					string.append(variables.getVariable(token));
				} else {
					string.append(token);
				}
			}
			
		}
		
		if (tokensN > 0) {
			String s2 = string.toString();
			if (tokensN > 1)
				s2 = Eval.eval(s2);
			prms.add(s2);
			read++;
		}
		
		if ((number > 0) && (read != number)) {
			throw new RuntimeException("Incorrect number of parameters");
		}
		
		String[] result = new String[prms.size()];
		for(int i = 0; i < prms.size(); i++)
			result[i] = prms.get(i);
		
		return result;
	}