y_hooks problem
#1

Hello!
I have a problem with y_hooks, it says that

pawn Код:
(error) symbol already defined: "@yH_OnGameModeInit@003"
This is how my gamemode is now, basically blank

main

pawn Код:
#include "a_samp.inc"
#include "YSI_Coding\y_hooks.inc"
#include "a_mysql.inc"
#include "YSI_Coding\y_timers.inc"

#include "modules/core/connect.pwn"
#include "modules/core/init.pwn"

main()
{
}

public OnGameModeInit()
{
    return true;
}
connect.pwn

pawn Код:
#include "YSI_Coding\y_hooks.inc"
#define SQL_HOST                "localhost"
#define SQL_USERNAME            "root"
#define SQL_PASSWORD            ""
#define SQL_DATABASE            "test"

new MySQL:handle;

hook OnGameModeInit()
{
    mysql_log(ALL);
    handle = mysql_connect(SQL_HOST, SQL_USERNAME, SQL_PASSWORD, SQL_DATABASE); // connect and check for cnnectiviti ->
    if(mysql_errno(handle) != 0 || handle == MYSQL_INVALID_HANDLE) // shutdown server if conn not established ->
    {
        print("[CONNECTION] Mysql connection not established; Shuting down the server!");
        SendRconCommand("exit");
        return true;
    }
    return true;
}
init.pwn

pawn Код:
#include "YSI_Coding\y_hooks.inc"

hook OnGameModeInit()
{
    SetGameModeText("Test");
    return true;
}
What could be causing this problem? What did I do wrong?
Reply


Messages In This Thread
y_hooks problem - by ShoortyFl - 22.07.2018, 20:01
Re: y_hooks problem - by Calisthenics - 22.07.2018, 20:22
Re: y_hooks problem - by ShoortyFl - 22.07.2018, 20:37
Re: y_hooks problem - by JasonRiggs - 22.07.2018, 21:28
Re: y_hooks problem - by Calisthenics - 22.07.2018, 21:33
Re: y_hooks problem - by J0sh... - 22.07.2018, 21:47
Re: y_hooks problem - by DBZdabIt3Bro7 - 22.07.2018, 23:17
Re: y_hooks problem - by JasonRiggs - 23.07.2018, 00:09
Re: y_hooks problem - by ShoortyFl - 23.07.2018, 11:17
Re: y_hooks problem - by ShoortyFl - 23.07.2018, 11:49

Forum Jump:


Users browsing this thread: 2 Guest(s)