file question

Blitz3D Forums/Blitz3D Beginners Area/file question

mudcat(Posted 2004) [#1]
I want to save the settings for each person in my game in a file named whatever name they input.
Can I do this.
name$=input$("give me ur name please")

writefile("players\"+name$+".dat")

and if not...how would u do it?

Thanks,
mudcat


Gabriel(Posted 2004) [#2]
Yes and no. You can do it, but you'll have to remove illegal characters from the name they input. Certain characters cannot appear in the name of a file and if they're there, something will break ( no idea what, I've not tried it. )

Just ensure that the player only inputs numbers and letters, and yeah, no sweat.


mudcat(Posted 2004) [#3]
thanks,
I do all my coding on paper first then try it later,this will help me write more code before hitting the ide.
Thanks again,
mudcat