So I’m creating this kind of custom damagelog for TTT where basically you can type in “ttt_print_playerlog” then a portion of or all of the players name or steam ID. It will then go through all the players, find any that match and if it only matches one then it will continue.
It will search through a table which is a damage log, every part of the table is a string sudoing the damagelog, my problem is if the players name that it is searching for has a space it doesn’t seem to work. (At least that’s what I seem to find) the only special characters my name has in it are “[” “]” " ’ " and a space. while these are in my name string.find does not seem to want to work, is there a way of fixing this? I printed out string.lower of both the lines in the table and my name and it should match up.
00:05.40 - dmg: [emp’g] 61352151511 [traitor] damaged bot02 [innocent] for 20 dmg
– string.find(string.lower(damagetable*), string.lower(MatchingPlayers:Nick()))
doesn’t want to work, damagetable* is the line in the damagelog (Me damaging bot2), MatchingPlayers:Nick() is the person being searched for. Any help is appreciated