Hello,
I'm trying to edit a gamemode to so it's functional in gmod 13.
So far it's going pretty well.
But for some reason this just wont work:
[lua]
if string.match(stringvalue, "(-?[0-9]+\.[0-9]+) (-?[0-9]+\.[0-9]+) (-?[0-9]+\.[0-9]+)") then -- Line 630
local x,y,z = string.match(value, "(-?[0-9]+\.[0-9]+) (-?[0-9]+\.[0-9]+) (-?[0-9]+\.[0-9]+)")
value = Vector(x,y,z)
end
[/lua]
I'm getting:
[code]
[ERROR] gamemodes/GAMEMODE/gamemode/cl_init.lua:630: invalid escape sequence near '"(-?[0-9]+'
1. unknown - gamemodes/GAMEMODE/gamemode/cl_init.lua:0
[/code]
What to do? Is this a changed function in gmod 13?
Lua uses %, not \, for escaping. It's always been that way.
[QUOTE=Divran;38531037]Lua uses %, not \, for escaping. It's always been that way.[/QUOTE]
Thank you very much for your help :)
Sorry, you need to Log In to post a reply to this thread.