So, I am attempting to make my game log all chatted commands to my MySQL database through a mixture of PHP, MySQL, and Lua. I have finished the PHP code, but on my game code, I get the following error.
ServerScriptService.ChatManager:7: attempt to perform arithmetic on a string value
local player3 = game.Players.LocalPlayer
local chatMessageEvent = game.ReplicatedStorage.ChatMessage
hs = game:GetService("HttpService")
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
hs:GetAsync("http://url.com/Method=WriteToChatlog&PlayerName=" + player.Name + "&PlayerID=" + tonumber(player.UserId) + "&PlaceID=" + tonumber(game.PlaceId) + "&PlaceName=" + game.Name, true)
end)
end)

1 comment
Concatenation in Lua is .. not like Java or Python where it's +.