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!
Try using this:
if a.Source.Name == codes[i] then --do something end