SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 30/06/2020, 11:04 PM   #1
xRadical3
Gangsta
 
Join Date: May 2017
Location: Iran
Posts: 638
Reputation: 47
Default RegEx plugin does not load

Code:
Loading plugin: libRegEx
  Failed.

[DEBUG] regex_exmatch
[DEBUG] regex_exsearch
[DEBUG] regex_exreplace
what's the solution?
All other plugins load well and have no problems.
I have onig.dll in the root folder.
Regular Expressions Plugin v0.2 (RegEx)

I just wanted regex for a anti adv system.
xRadical3 is offline   Reply With Quote
Old 01/07/2020, 03:27 PM   #2
IZenta
Banned
 
Join Date: Jan 2020
Location: Indonesia
Posts: 24
Reputation: 16
Default Re: RegEx plugin does not load

Go download VC Redist 2013 or VC Redist x86 2015-2019 or you can use Pawn.Regex
IZenta is offline   Reply With Quote
Old 01/07/2020, 09:07 PM   #3
xRadical3
Gangsta
 
Join Date: May 2017
Location: Iran
Posts: 638
Reputation: 47
Default Re: RegEx plugin does not load

Solved.
I just put MSVCP100D.dll and MSVCR100D.dll in my root folder.
xRadical3 is offline   Reply With Quote
Old 03/07/2020, 08:01 AM   #4
Salik
Big Clucker
 
Salik's Avatar
 
Join Date: Aug 2015
Location: Russia
Posts: 77
Reputation: 0
Default Re: RegEx plugin does not load

Use Pawn.Regex, in your plugin have bug - crash server.
Salik is offline   Reply With Quote
Old 03/07/2020, 08:22 AM   #5
xRadical3
Gangsta
 
Join Date: May 2017
Location: Iran
Posts: 638
Reputation: 47
Default Re: RegEx plugin does not load

I don't know how to replace this code from LibRegEx to Pawn.RegEx. ^( '-' )^

pawn Code:
forward bool:IsAdvertisement(text[]);
public bool:IsAdvertisement(text[])
{
    new message[128], build, expression[] = "(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.+){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)", start, end;
    strcpy(message, text, sizeof(message));

    for(new i = 0, j = strlen(message); i < j; i ++)
    {
        switch(message[i])
        {
            case '0'..'9': continue;
            case '.': continue;
            default:
            {
                strdel(message, i, i + 1);
                strins(message, ".", i);
            }
        }
    }

    build = regex_exbuild(expression);
    regex_exmatch(message, build);
    regex_exsearch(message, build, start, end);

    if(start >= 0) return true;
    return false;
}
Are you sure LibRegEx plugin crash my server?
xRadical3 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Pedido] Plugin regex.dll NTZ Português/Portuguese 1 16/11/2019 02:11 PM
REGEX - YourShadow's plugin Dayrion Scripting Help 3 29/07/2018 10:02 AM
plugin regex wont load elhanan Server Support 5 01/03/2017 07:12 PM
RegEx plugin fails to load Moron Scripting Help 12 04/04/2016 07:30 PM
Regex plugin needed!? Djane Scripting Help 7 13/12/2013 10:00 AM


All times are GMT. The time now is 12:08 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.