Error reading file.

Hi I get an error when trying to read a file.
Yes the ply:SetWcLevel is a working function.
Here is the error.

[gamemodes\mrp\gamemode\init.lua:36] Lua file rights error. A script tried to access the file "data\MRP\STEAM_0:1:38121928\levels\woodcutting.txt". Your current rights only allow access to files in GMod's base folder.



I don’t know what is wrong. I scripted it myself :frowning:

Hi, I think you can’t use “:” in folder names.

But i already did file.write and the folder was created.

[editline]12th February 2012[/editline]

Or not…

[editline]12th February 2012[/editline]

How would I replace them with something, and what would i replace them with?

You could just remove them

ply:SetWcLevel(file.Read("MRP/"..string.gsub(ply:SteamID(), ":", "").."/levels/woodcutting.txt"))

Replace them with _ instead of removing them.