How to load a mycred hook from a plugin?

Eventually I did this in the function of my plugin where I was loading my game,

$mycredhook = new my_demo_hook_class();
do_action( ‘play_game’, $mycredhook);

Not sure if this is the correct way to go, but it worked.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)