I found this script ($gameActors.actor(1).equips(x).contains($dataWeapons[x]))
but I don't know what numbers to put where "x" is or if this is correct at all.
Please help.
Where did you find the script at? Typically, that value x is a variable in Javascript that was defined earlier in the script (or passed into the function as a parameter). You would have to look for where x is being defined at, which might involve finding where the function is being called from.
There are two x's in there, and they both refer to different things. That script only tells you if the actor has a specific weapon in a specific slot. This is not what you are looking for, so that script is not suitable for your requirements.
To see if actor 5 has NO weapons, you would put the following in the Script line of the conditional branch:
$gameActors.actor(5).weapons().length === 0