ID:2406179
 
(See the best response by Nadrew.)
Code:
var/txt_file = input("Please select a txt file.","Choose a txt file.") as null|file


Problem description:

So I'm trying to play around with file2text() but as far as I know, byond only has 3 file options for input sources, sound/icon/file.

Is there a way to confirm a file selected via the code listed above is actually a .txt file and not say... a .doc file... or a .jpg...?
Best response
Best you can do is check the extension itself using copytext() or string[index].