diff --git a/caver/tsc_file.lua b/caver/tsc_file.lua index 4bd1abb..7df9551 100644 --- a/caver/tsc_file.lua +++ b/caver/tsc_file.lua @@ -10,20 +10,20 @@ end function TscFile:placeScriptAtEvent(script, event, mapname, needle) needle = needle or " pEnd then -- This is totally normal and can be ignored. - -- print(('Found "%s", but was outside of label.'):format(needle, replacement)) - return text, false + local err = ('Found "%s", but was outside of label (%d, %d) at index %d.'):format(needle, pStart, pEnd, i) + return text, err end -- find the earliest occurence of an override @@ -69,7 +69,7 @@ function TscFile:_stringReplace(text, needle, replacement, label, overrides) assert((j % 1 == 0), tostring(j)) local a = text:sub(1, i - 1) local b = text:sub(j + 1) - return a .. replacement .. b, true + return a .. replacement .. b, nil end function TscFile:_getLabelPositionRange(label)