I am having problems writing to a file. In another function I have no problem writing to a file. Here is the code. Thanks in advance.
function UpdatePlayersMNU(playerName$)
if file exist("data\characters\players.xml")
open to write 2, "data\characters\players.xml"
write string 2, "<character>" + playerName$ + "</character>"
close file 2
else
make file "data\characters\players.xml"
open to write 2, "data\characters\players.xml"
write string 2, "<character>" + playerName$ + "</character>"
close file 2
endif
endfunction