EDIT: Mark this as invalid - "On second though, this is probably an invalid report as the function itself is running commands off the executed entity, thus changing the successcount, instead of returning successcount based on the success of the function as a whole"
When a function is called from an entity with SuccessCount stat from inside a function, the SuccessCount will only reflect the last command of the executed function.
For example, if function 'test:test' has the commands:
execute @e[type=area_effect_cloud,tag=conditional,c=1] ~ ~ ~ function test:test2
execute @e[type=area_effect_cloud,tag=conditional,c=1,score_success_min=1] ~ ~ ~ say successful
where the area_effect_cloud has SuccessCount stored on @s on the success objective, and function 'test:test2' has the commands:
where testfor @p will be successful but testfor @e[tag=doesnotexist] will not, the area_effect_cloud will not say 'successful' when 'test:test' is run.
1. download attached function zip
2. put it in your world
3. run /function test:test
4. notice that chat will say 'ran test' 'ran test2' but will not say 'successful'
5. remove 'testfor @e[tag=doesnotexist]' (so that the last command is now one that will run successfully) and run again
6. notice it will now say 'successful'
What should happen is it should be successful based on if the function itself was able to run at all.
This issue is not present when tested with conditional command blocks where the first runs a function command and the second conditional prints to chat if successful. In the case of command blocks, the second command will always run if the function ran at all, and is not dependent only on the last command in the function.
To compare to conditional command blocks:
1. impulse: /function test:test2
2. conditional chain: /say successful
3. 'successful' will always output as long as test2 is a valid function with no errors