diff --git a/GuideTable.lua b/GuideTable.lua index 0f4bfe8..95d0ef2 100644 --- a/GuideTable.lua +++ b/GuideTable.lua @@ -85,7 +85,7 @@ function objGuideTable:new(oSettings) ["replace"] = "|c00a80000" }, } - for n = 1, getn(opentext) do + for n = 1, #opentext do t1[k1].items[k2].str = gsub(t1[k1].items[k2].str, opentext[n]["find"],opentext[n]["replace"]) end t1[k1].items[k2].str = gsub(t1[k1].items[k2].str, "#","|r") diff --git a/README-CoA.md b/README-CoA.md index 6279906..2f18cc8 100644 --- a/README-CoA.md +++ b/README-CoA.md @@ -27,6 +27,13 @@ have thrown `attempt to index global 'arg' (a nil value)` on every debug call. Local-shadow `arg = {...}` keeps the rest of each function unchanged. +**3. Lua 5.0 `getn` → length operator.** `GuideTable.lua` used the +Lua 5.0 global `getn(opentext)` to size a colour-substitution table. +That global is gone in Lua 5.1 (`table.getn` was deprecated and the +bare `getn` removed entirely). Replaced with `#opentext`. Would have +crashed on the very first guide load with +`attempt to call global 'getn' (a nil value)`. + What is still TODO ------------------ @@ -57,6 +64,8 @@ Files we touched - `VanillaGuide.toc` — Interface bump, CoA metadata. - `Core.lua` — local-shadow `arg = {...}` inside `Di` and `Dv`. +- `GuideTable.lua` — `getn(opentext)` → `#opentext`. +- `README.md` — upstream Donations / volunteer-pitch section removed. - `README-CoA.md` — this file. Everything else is the unmodified 1.04.2 import.