Error went practice save MQTT to MySQL

Hello, I practiced Save MQTT to Mysql topic, had a issue.

In 47:00 we have to add a script to “deps/emq_plugin_template/src/emq_plugin_template.erl”. I added this script and change with my APP key.
https://youtu.be/Tp5EFG4W5WU

After that use make to run emq and have error:
src/emq_plugin_template.erl:85: function on_message_publish/2 already defined
src/emq_plugin_template.erl:98: Warning: variable ‘R’ is unused
…/…/erlang.mk:1174: recipe for target ‘ebin/emq_plugin_template.app’ failed
make[2]: * [ebin/emq_plugin_template.app] Error 1
…/…/erlang.mk:992: recipe for target ‘app’ failed
make[1]: * [app] Error 2
make[1]: Leaving directory ‘/home/tungnt/emq-relx/deps/emq_plugin_template’
erlang.mk:310: recipe for target ‘deps’ failed
make: * [deps] Error 2

I used Ubuntu 16.04, EMQ 2.3.10.
Please help me. Thanks

It says function already defined. I guess you didnt replace the function and just copied another with same name. Please double check.