I've got this error...
Code:
L 03/04/2013 - 15:32:37: String formatted incorrectly - parameter 4 (total 4)
L 03/04/2013 - 15:32:37: [AMXX] Run time error 25 (plugin "antiad.amxx") - debug not enabled!
I just added dictionary to the plugin, don't know why :/
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <regex>
new Regex:re, ret;
public plugin_init() {
register_plugin("Anti-Ad", "0.1", "Mati");
register_clcmd("say", "CheckMessage");
register_clcmd("say_team", "CheckMessage");
new err[32];
re = regex_compile("(?:\w+\.[a-z]{2,4}\b|(?:\s*\d+\s*\.){3})", ret, err, 31, "i");
if (re!=REGEX_OK) server_print("Error: %s (%d)", err, ret);
register_dictionary("antiad.txt")
}
public CheckMessage(id) {
if (id > 0 && id < 33) {
new text[64];
read_args(text,63);
if (strlen(text) > 4) {
new match = regex_match_c(text, re, ret);
if (match > 0) {
client_print(id, print_chat, "%L", "NOT_ALLOWED");
return PLUGIN_HANDLED;
}
}
}
return PLUGIN_CONTINUE;
}
public plugin_end() {
regex_free(re);
}