I want to get the line that comes after a line in a file
so say I have a file that records chat(IE everything that is said)
Hi
sup
bricks are fun
OMG SRSLY?
now, if someone says something that is in the file, I want to grab the line after it, IE
if they said Hi, it would return as sup
How would I do this?
I can record to the file, but when I try to grab the right line or check if someone said something in the file, everything goes horribly wrong.(i.e returns a random line, or returns lines even when there isnt a match ect. ect.)