I’ve searched the forum for information on this, but haven’t found an answer…
I tried to use a loop with character traversal with Source something like this:
local function GetStrings(source)
local i = 0
local stringLenght = string.len(source)
local thisStringLenght = 0
local thisString = ''
while i ~= stringLenght do
i += 1
thisStringLenght += 1
if string.sub(source, i, i + string.len("\n")) == "\n" then
print(thisString)
thisString = ""
else
thisString = thisString..string.sub(source, i, i)
end
end
end
Does anyone know what’s wrong here? Is there any way/method to make it quicker and shorter?
P.S. I’ve been looking for a solution for about 1.5 hours now…