Hi I get an error when trying to read a file.
Yes the ply:SetWcLevel is a working function.
Here is the error.
[code]
[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.
[/code]
Code:
[lua]
ply:SetWcLevel(file.Read("MRP/"..ply:SteamID().."/levels/woodcutting.txt"))
[/lua]
I don't know what is wrong. I scripted it myself :(
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
[CODE]
ply:SetWcLevel(file.Read("MRP/"..string.gsub(ply:SteamID(), ":", "").."/levels/woodcutting.txt"))
[/CODE]
[QUOTE=slay3r36;34662182]You could just remove them
[CODE]
ply:SetWcLevel(file.Read("MRP/"..string.gsub(ply:SteamID(), ":", "").."/levels/woodcutting.txt"))
[/CODE][/QUOTE]
Replace them with _ instead of removing them.
Sorry, you need to Log In to post a reply to this thread.