Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My match bool isn't working, and letting viruses bypass it?

Asked by 4 years ago
Edited 4 years ago

I'm making an anti-virus and it uses string:match() to see if it's a virus or not. However, when it scans, it says it's not although it is a virus. Here is the line:

if a.Source:match(codes[i]) then

a is the object being scanned.
i is the argument in a for loop.
codes is the virus definition.
Can anyone help? Thanks in advance!

1 answer

Log in to vote
0
Answered by
haba_nero 386 Moderation Voter
4 years ago

Try using this:

if a.Source.Name == codes[i] then
    --do something
end
Ad

Answer this question