Raised This Month: $ Target: $400
 0% 

Multi Lingual error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Unkolix
Veteran Member
Join Date: Sep 2012
Old 03-04-2013 , 08:42   Multi Lingual error
Reply With Quote #1

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:reret;

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})"reterr31"i");
    if (
re!=REGEX_OKserver_print("Error: %s (%d)"errret);
        
register_dictionary("antiad.txt")
}

public 
CheckMessage(id) {
    if (
id && id 33) {
        new 
text[64];
        
read_args(text,63);
        
        if (
strlen(text) > 4) {
            new 
match regex_match_c(textreret);
        
            if (
match 0) {
                
client_print(idprint_chat"%L""NOT_ALLOWED");
                return 
PLUGIN_HANDLED;
            }
        }
    }
    return 
PLUGIN_CONTINUE;
}

public 
plugin_end() {
    
regex_free(re);    

Unkolix is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-04-2013 , 08:56   Re: Multi Lingual error
Reply With Quote #2

Show antiad.txt contents.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 03-04-2013 , 09:14   Re: Multi Lingual error
Reply With Quote #3

Here.
Attached Files
File Type: txt antiad.txt (125 Bytes, 103 views)
Unkolix is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-04-2013 , 09:25   Re: Multi Lingual error
Reply With Quote #4

client_print(id, print_chat, "%L", "NOT_ALLOWED");

->

client_print(id, print_chat, "%L", id, "NOT_ALLOWED");
__________________
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-04-2013 , 09:25   Re: Multi Lingual error
Reply With Quote #5

My bad, wasn't required.

PHP Code:
client_print(idprint_chat"%L""NOT_ALLOWED"); 
->

PHP Code:
client_print(idprint_chat"%L"id"NOT_ALLOWED"); 
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 03-04-2013 , 09:57   Re: Multi Lingual error
Reply With Quote #6

Oh, right! How could I forget that!? Oh, GOD... I am so disappointed right now...
Unkolix is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode