I believe what Mateos was talking about is the lua binary version. NQ requires lua 5.1, since etpro is even older it might just use the same thing. If you are running lua binaries you “got from this guy who got it from some other guy” rather than the official latest 5.1 binaries, there might be unwanted behaviour.
In the clearSpace() function, the argument is called ‘string’, and later on we call the function string.len(string). What is intended is that we call the ‘len’ function of the ‘string’ library, but a different binary version might interpret this as performing something on the local variable ‘string’. So maaaybe, renaming the variable might do the trick. Either way, you might want to re-download your lua binaries.
Try replacing the function clearSpace(string) with the following (I just renamed the variable to ‘input’):
local output = ""
local i = string.len(input)
while (string.sub(input,i,i) == " " or string.sub(input,i,i) == " ") do
input = string.sub(input,1,(i-1))
i = i - 1
while (string.sub(input,1,1) == " " or string.sub(input,1,1) == " ") do
input = string.sub(input,2)
i = 1
while string.sub(input,i,i) ~= "" do
if string.sub(input,i,i) ~= "\"" then
output = output .. string.sub(input,i,i)
i = i + 1