SA-MP Forums Archive
How can I check if there is a specific string in a .txt file? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How can I check if there is a specific string in a .txt file? (/showthread.php?tid=652696)



How can I check if there is a specific string in a .txt file? - AmarPlayer - 17.04.2018

I need a player to input something and then it gets stored in a txt file but I don't want them to be able to type in the same thing twice. I already got everything set up except that, I read the Wiki page "File Functions" but I can't figure it out. Help is appreciated.


Re: How can I check if there is a specific string in a .txt file? - saffierr - 18.04.2018

Check the file where the player's inputtext is getting stored.
Then check if the player's inputtext matches one of the stored inputtext from the file, if yes return error.
Hope you get it.


Re: How can I check if there is a specific string in a .txt file? - OneDay - 18.04.2018

Use a database.