Get current Weapon

Hello, I am trying to get the current weapon the player is holding, I have this:
client.lua (203 Bytes)
the console is saying: ‘)’ expected (to close ‘(’ at line 2) near ‘TriggerEvent’
what is my problem, I tried closing the parentheses but It didn’t work

You missing “)” on at line 2

After

GetCurrentPedWeapon(GetPlayerPed(-1)

Before

GetCurrentPedWeapon(GetPlayerPed(-1))

it looks cleaner if you add null safety check

RegisterCommand("wepcheck", function()
    local found, currentWeapon = GetCurrentPedWeapon(GetPlayerPed(-1), true)
    if found then
        TriggerEvent('chat:addMessage', {args = {'^*Your current weapon is: ' .. currentWeapon .. ' -script by Kadin S.'}})
    end
end)    

oh shit I’m dumb lol, thank you so much!