key = context.getFlag('n');
if(VariableManager.instance.hasVariable(context.getString(0), key)) {
if(!RegexUtil.VARIABLE_KEY_PATTERN.matcher(context.getString(0)).find())
throw new FastCommandException("Invalid Variable Name!");
checkModifyPermissions(sender, key, context.getString(0));
if(!RegexUtil.VARIABLE_VALUE_PATTERN.matcher(context.getString(1)).find())
throw new FastCommandException("Invalid Variable Value!");
String var = VariableManager.instance.getVariable(context.getString(0), key);
try {
double f = Double.parseDouble(var);
if(f == 0)
throw new FastCommandException("Can't divide by 0!");
f /= context.getDouble(1);
var = String.valueOf(f);
if (var.endsWith(".0"))
var = var.replace(".0", "");
} catch (RuntimeException e) {
throw e;
} catch(Exception e) {
throw new FastCommandException("Variable not of numeric type!");
}
VariableManager.instance.setVariable(context.getString(0), key, var);
resetICCache(context.getString(0), key);
sender.sendMessage(ChatColor.YELLOW + "Variable is now: " + var);
} else
throw new FastCommandException("Unknown Variable!");
}