Help with file.Write() and a Gamemode

hi i am trying to fix a old gamemode and to get it working i am re-writing the save functions that it had before and upon doing so i ran into a error which makes no sense and shouldnt be happening.
When the code: [lua]file.Write(“ZombifiedWorld/Players/”…tostring(ply:SteamID())…".txt","
")[/lua] is used, it says, [lua]
[gamemodes\zombifiedworld\gamemode\server\player_profiles.lua:179] Lua file rights error. A script tried to access the file “data\ZombifiedWorld\Players\STEAM_0:0:0.txt”. Your current rights only allow access to files in GMod’s base folder.
[/lua]

so i want to know how this is happening and how to fix it, i have tryed to use hIO but the filewrite function seems to be broken.

you can’t use : in a filename

[lua]FilePath = “ZombifiedWorld/Players/”…string.gsub(ply:SteamID(), “:”, “!”)…".txt"[/lua]

That’s what I’m using in my gamemode, and it works fine.

you need a bool at the end of the function i think due to new update (put true to skip data folder)

Wrong, again. Ignore dingusnin. file.Write wont write :'s, read PortalGods post for the best soloution

instead of steamid use this

Seriously?

If you read the change-log it even said: “Added OPTIONAL argument to skip data folder.” In big happy caps for you to understand.

@op as guy above me said. Use UniqueID it’s designed for just this:

**[Player.UniqueID

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Player.UniqueID)**