void value not ignored as it ought to be

but no luck.

Programming is not a matter of luck. It is a matter of skill.

What does "but no luck" mean? Does the code not compile? Does it compile but not do what you want?