RegEx plugin does not load - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: RegEx plugin does not load (
/showthread.php?tid=677124)
RegEx plugin does not load -
xRadical3 - 30.06.2020
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.
Re: RegEx plugin does not load -
IZenta - 01.07.2020
Go download VC Redist 2013 or VC Redist x86 2015-2019 or you can use Pawn.Regex
Re: RegEx plugin does not load -
xRadical3 - 01.07.2020
Solved.
I just put MSVCP100D.dll and MSVCR100D.dll in my root folder.
Re: RegEx plugin does not load -
Salik - 03.07.2020
Use Pawn.Regex, in your plugin have bug - crash server.
Re: RegEx plugin does not load -
xRadical3 - 03.07.2020
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?