When I write a simple function like this
testfor @a
? say someone detected !
scoreboard players test @a scorename 0 100
? say someone matches !
and when I run it, it says nothing.
The weird thing is if I write that in command blocks (with chain-conditionnal cb),
it says something (what it's supposed to do).
What is the question mark supposed to do? That isn't valid command syntax. If you want to simulate "conditionals" in functions, you should use
/stats
.