Since about 6 hours (as far as I can tell), one of the chat modules has been giving this error in production. This is inconvenient because it ends up in our logger that we set up for our game. I have heard that other games also see this error so it is not specific to any game.
Error caused by:
ServerScriptService.ChatServiceRunner
Message:
Chat.ChatModules.FriendJoinNotifier:39: attempt to call a string value
Stack trace:
Chat.ChatModules.FriendJoinNotifier, line 39 - upvalue SendFriendJoinNotification
Chat.ChatModules.FriendJoinNotifier, line 49
It’s been two weeks since the original post and the module is still spewing out errors at a phenomenal rate. Care to give a status update on the fix?
Sorry to ask again about this, but I’m wondering if the fix got pushed back or if the next release hasn’t happened yet? I don’t like keeping the chat module stuff overwritten in case any updates are pushed for that (and then we won’t get those).
Check the source of your “FriendJoinNotifier” modulescript.
Do lines 12-14 look like this?
local ChatLocalization = nil
pcall(function() ChatLocalization = require(game:GetService("Chat").ClientChatModules.ChatLocalization) end)
if ChatLocalization == nil then ChatLocalization = {} function ChatLocalization:Get(key,default) return default end end
Note the “ChatLocalization:Get” which was something else before (that was the source of the error). It should look like this.
The error is at line 39 right now. If you look very carefully at my screenshot, there should be a comma where my cursor is. What is written there now is that it should call the result of string.gsub with the string “System” as its first argument.
local function SendFriendJoinNotification(player, joinedFriend)
local speakerObj = ChatService:GetSpeaker(player.Name)
if speakerObj then
speakerObj:SendSystemMessage(string.format("Your friend %s has joined the game.", joinedFriend.Name), "System", FriendMessageExtraData)
end
end