diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-05-24 09:22:40 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-05-24 09:22:40 -0400 |
commit | b0ef843fe0702482e843379b4975b2dda4d58935 (patch) | |
tree | 0db08787dfcf84c8a12f4b8a5f189de6e180a8e4 /indra/newview/scripts/lua/test_LLChat.lua | |
parent | 591a80765c4438f72795230824d2e549bafc592d (diff) |
Nat's ideas from PR #1547
Diffstat (limited to 'indra/newview/scripts/lua/test_LLChat.lua')
-rw-r--r-- | indra/newview/scripts/lua/test_LLChat.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/scripts/lua/test_LLChat.lua b/indra/newview/scripts/lua/test_LLChat.lua index 95bd218baa..3c5cbeeeb2 100644 --- a/indra/newview/scripts/lua/test_LLChat.lua +++ b/indra/newview/scripts/lua/test_LLChat.lua @@ -2,17 +2,17 @@ LLChat = require 'LLChat' function generateRandomWord(length) local alphabet = "abcdefghijklmnopqrstuvwxyz" - local word = "" + local word = {} for i = 1, length do local randomIndex = math.random(1, #alphabet) - word = word .. alphabet:sub(randomIndex, randomIndex) + table.insert(word, alphabet:sub(randomIndex, randomIndex)) end - return word + return table.concat(word) end -local msg = "" +local msg = {'AI says:'} math.randomseed(os.time()) for i = 1, math.random(1, 10) do - msg = msg .. " ".. generateRandomWord(math.random(1, 8)) + table.insert(msg, generateRandomWord(math.random(1, 8))) end -LLChat.sendNearby(msg) +LLChat.sendNearby(table.concat(msg, ' ')) |