var/game = input("Enter game path","Game") as text
game = game + "/"
var/list/added_files = list()
var/list/checked = list()
var/path = game
var/opath = game
checking
for(var/v in flist("[path]"))
if(added_files.Find(v)||checked.Find(v))
continue
if(copytext(v,length(v),length(v)+1)=="/")
checked+=v
v = copytext(v,1,length(v))
path = "[path][v]"
goto checking
if(findtext(v,".dmb")==0&&findtext(v,".rsc")==0&&findtext(v,".txt")==0&&findtext(v,".sav")==0)
alert("You are attempting to upload an unauthorized file,[v], please consult our Terms of Use page to see which files may be uploaded onto our server, thank you!")
return
else
added_files += v
if(!(added_files.Find("[game_name].dmb"))||!(added_files.Find("[game_name].rsc")))
//if(!(findtext(v,".dmb"))||!(findtext(v,".rsc")))
alert("You either forgot to add the .dmb file or the .rsc file, which are key files, please try again!")
return
Problem description:
im using this batch of code to indentity a given path on a users computer which contains his game files which will later be uploaded to the server.
Now first im scanning to see what kind of files the user is trying to upload to make sure that their only game related files(.dmb,.rsc,.sav etc) but for some reason if the user is trying to upload say file called "savefiles/" and inside it theres another file and inside it another file it will not scan the contents of the third file.
Help anyone?