on right click:
if target living entity is set:
myFunction(targeted entity)
function myFunction(e: entity):
damage {_e} by 3 hearts
this should damage the targeted entity by 3 hearths, but it just doesn't do anything. it doesn't output any errors.
pretty sure this is an issue with your code
Confirmed:

I think function paramaters has some issues, I have heard a few times issue about using has item condition with a player parameter. I will try that.
Just tested it:
function test(p: player) :: boolean:
if {_p} has stone:
return true
return false

Works when i use {_p}'s inventory has stone and items in {_p} returns slot list correctly.
on sneak toggle:
player isn't sneaking
myFunction(player)
function myFunction(p: player):
broadcast "%{_p}%"
damage {_p} by 3
It also doesn't work with players, though it broadcasts their names, that seems actually logical since it neighter works with entities. I also tried using living entity in the parameter, no luck.
Another strange thing is that if you try to use play hurt on {_e} in the function it warns you that hurt can only be played on entities, this is useless in this case because variables are dynamic, the warn should only occure when using a invailid static type
Making this issue the main one for these types of bugs (the many we've referenced above in other issues). There's seemingly some general issues with how certain (or all?) expressions/effects, such as removing a potion effect or damaging an entity, work with entities stored in variables. Needs investigating.
After some debugging - functions are not the problem in any of the mentioned issues, neither are entities. Variables are the problem.
TL;DR the issue described in OP seems to affect any syntax which contains an expression that accepts multiple types, and a variable of type other-than-the-first-one is used. As an example, the syntax of EffHealth is damage %slots/livingentities/itemstack% .... When you do damage {_some.slot} ... it will work, but not damage {_some.player} ... nor damage {_some.itemstack} ...
Let's keep using EffHealth as an example - it calls damageables.getArray(e)
damageables is a variable, and Variable#getArray(Event) (Variables extend Expression) returns an empty array for entities. It is supposed to return:
The thing is that the parser somewhere (I'm yet to find the exact place in code, and update this issue with the respective information, unless someone does it before me) determines that the variable should be of the first possible type, a Slot in this case

Since a CraftPlayer cannot be converted to a Slot, the returned array is empty, hence nothing is looped in EffHealth, and as a result nothing happens.
Actually turns out that @bensku has discovered all of this already back in 2016
And that means that #59 is a duplicate of this issue (or, more precisely, this issue of #59, but this one has more information)
@Nicofisi Sorry for late response. Anyway... The parser bug I explained in that comment was supposedly fixed in dev30. I'm a bit puzzled now...
Hi,
CarloDrift found this bug, wich is related to this issue :
command /cmd1:
trigger:
while player is online:
broadcast "&a1 ok"
wait 2 seconds
function funcWhile(p: offline player):
while {_p} is online:
broadcast "&a2 ok"
wait 2 seconds
command /cmd2:
trigger:
funcWhile(player)
/cmd1 works but not /cmd2 (there is not broadcast)
so sorry, but it's not completed @Nicofisi ^^
@noftaly "completed" means that this will be available in the next Skript release :)
Oh ok ty 馃槂