1. How to get the player's name which i trade?

    when a player trading to me,how to get his name? my code is Right?

    local frame = CreateFrame("Frame")

    local function myEventHandler(self,event,...)

    local arg1, arg2, arg3, arg4, arg5, arg6 = ...;

    if event == "TRADE_REQUEST" then

    SendChatMessage(""..arg1.."request trade","SAY","COMMON");

    elseif event == "TRADE_SHOW" then

    print("success")

    end

    end

    frame:RegisterEvent("TRADE_REQUEST")

    frame:RegisterEvent("TRADE_SHOW")

    frame:SetScript("OnEvent",myEventHandler)

  2. You should be able to get the name of the play you are trading with by querying UnitName("npc").

  3. thank you!