• If statement not working, even though it should
    0 replies, posted
    if (string.match(file.Read(filename, path), checker) != nil) then         for i,v in pairs( filet ) do         print(v)         print(checker)             if (string.match(v, checker) != nil) then                 filet[i] = string.Replace(v, checker, checker .. adder .. "," )                 file.Write(filename, "Hi")             end         end     else The if statement on the top line works perfectly, putting me into the for loop. The table filet is my file, but split line by line into a table. Print(v) outputs "STEAM_0:0:0 Citizen private", and Print(checker) outputs "STEAM_0:0:0 Citizen ". So obviously, the beginning parts of the strings match. But, the If statement below the 2 print commands doesn't run.
Sorry, you need to Log In to post a reply to this thread.