How could I replace all spaces with %20 to be used as a web address?
[QUOTE=CmdrMatthew;27619272]How could I replace all spaces with %20 to be used as a web address?[/QUOTE]
[lua]
local newString = string.gsub(oldString, "%s", "%20");
[/lua]
[QUOTE=somescripter;27619394][lua]
local newString = string.gsub(oldString, "%s", "%20");
[/lua][/QUOTE]
ERROR: Hook 'Translate' Failed: [@lua\autorun\client\ultratool.lua:120] invalid capture index
this is when there is a space
[lua]
url = url:gsub("%s","%%20")
[/lua]
[QUOTE=ralle105;27621143][lua]
url = url:gsub("%s","%%20")
[/lua][/QUOTE]
Aha yeah, my bad. I'm tired.
Sorry, you need to Log In to post a reply to this thread.