Loading custom file based on a dependant file that is also dependant on another file

Issue resolved. nothing wrong with the script i posted. turns out i was calling the wrong file in the first wp_register_script()

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