I'm getting the error message in the picture shown, with this lua code. what am i doing wrong
function()
local gold = GetTradePlayerItemInfo(7)
if gold ~= nil and gold > 0 then
local message = "Thanks for the trade! You gave me " .. gold .. " gold!"
SendChatMessage(message, "SAY")
end
end