Why is string.find returning nil with;
[lua]
local str = "a"
local result = string.find(str,"ab")
[/lua]
[QUOTE=jaooe;40086001]Why is string.find returning nil with;
[lua]
local str = "a"
local result = string.find(str,"ab")
[/lua][/QUOTE]
Because it is not finding ab since the string is only a
The correct format is, as Baig might have pointed out, is
string.find( Haystack, Needle );
Opposite many programming languages.
Cheers, thanks a lot guys.
Sorry, you need to Log In to post a reply to this thread.