Publicidad

Resultados 1 al 4 de 4
  1. #1
    [IG] Leecher Avatar de xx12xx
    Ingreso
    22 ago, 10
    Mensajes
    12
    País
    Gracias
    6
    1 agradecimiento en 1 Post

    Red face [Proyecto] Alpha 0.96.40T - 97D

    ******************************************
    & Versión : Gamesever 0.96.40 / 97D
    & Programador : José Hernández
    & Todos los Derechos Reservados
    ******************************************
    // --------------------------------
    //
    Correcciones
    // --------------------------------

    [Alpha] Flechas Infinitas [FIX]
    [Alpha] Adicional de Items +28 [FIX]
    [Alpha] Pks abren los shops [FIX]
    [Alpha] Pk Bug [FIX]
    [Alpha] CheckSum [FIX]
    [Alpha] Error-L2 [FIX]
    [Alpha] Los Pks pueden moverse [FIX]
    [Alpha] Los Pks pueden entrar a los eventos [FIX]
    [Alpha] Pocion bug [FIX]
    [Alpha] Manashield bug [FIX]
    [Alpha] Autoridad del Nick WebZen [FIX]
    [Alpha] Zen en Party [FIX]
    [Alpha] Bug DestroyGIocp [FIX]
    [Alpha] Offset 0x00000000 [FIX]
    [Alpha] Win Server Sp2 (GetQueuedCompletionStatus) [FIX]
    [Alpha] Socket Invalido [FIX]
    [Alpha] Menos Logs [NUEVO]
    [Alpha] Cambiado directorio de ServerInfo.dat [NUEVO]

    // --------------------------------
    //
    Modificaciones del Servidor
    // --------------------------------
    [Alpha] Anillos de Transformación
    [Alpha] Puntos por level
    [Alpha] Orbs Summon
    [Alpha] Mensaje de los guardias
    [Alpha] Mensaje de Bienvenida
    [Alpha] Anuncio de GameMaster
    [Alpha] Balance PvP [NUEVO]
    [Alpha] Sistema de Moves [NUEVO]

    // --------------------------------
    //
    Funciones
    // --------------------------------
    [Alpha] Conexion SQL
    [Alpha] Conexion SQL Modificada

    // --------------------------------
    //
    Comandos para Jugadores
    // --------------------------------
    [Alpha] /web
    [Alpha] /online
    [Alpha] /post ====> 3 colores y tiempo de mensaje
    [Alpha] /hora
    [Alpha] /zen

    // --------------------------------
    //
    Eventos
    // --------------------------------
    [Alpha] Blood Castle

    [Alpha] Devil Squared

    [Alpha] Invasion de Lord of Kundun [NUEVO]
    - Dropea 1 box of kundun+5
    - Anuncio de aparicion 1 minuto
    - Invasion random ( Lorencia, Dungeon, Losttower, Noria, Davias)
    - Aparece con sus tropas
    - Anuncio nombre del player al matar al kundun
    Última edición por xx12xx; 24/05/2016 a las 01:26 Razón: Nueva actualizacion, y beta 1 liberado

  2.    Publicidad


  3. #2
    [IG] Establecido Avatar de Warfox
    Ingreso
    21 jul, 14
    Mensajes
    327
    País
    Gracias
    6
    66 gracias en 48 Posts

    Re: [Proyecto] Alpha 0.96.40T - 97D

    yo uso esta para mi s3 sin ningun problema (con algunos cambios personales) para la conexion a la DB

    SQL.h
    Código:
    #ifndef _SQL_H
    #define _SQL_H
    
    
    class CSQLEx
    {
    public:
        CSQLEx();
        virtual ~CSQLEx();
    
    
        void Load();
        bool ConnectExt();
        bool Connect();
        void Disconnect();
        bool Execute(char* szQuery,...);
        char* GetLastError();
        void FreeHandle();
        int GetRow();
        int GetCol();
    
    
        int GetInt();
        void GetString(char* msg);
        bool FetchRow(char* out,int len);
        char FetchArray[1024][50];
        char*szDriver;
        char szServer[50];
        char szServer2[50];
        char szUser[50];
        char szPassword[50];
        char szDatabase[50];
    private:
        bool m_bConnected;
        HENV m_SQLEnvironment;
        HDBC m_SQLConnection;
        HSTMT m_STMT;
        long m_RowCount;
        long m_ColCount;
    };
    
    
    extern CSQLEx MySQL;
    
    
    #endif
    SQL.cpp
    Código:
    #include "Stdafx.h"
    
    
    
    
    CSQLEx MySQL;
    
    
    CSQLEx::CSQLEx()
    {
    }
    
    
    CSQLEx::~CSQLEx()
    {
        this->Disconnect();
    }
    
    
    void CSQLEx::Load()
    {
        szDriver="{SQL Server}";
        GetPrivateProfileStringA("SQL","Host","127.0.0.1",szServer,sizeof(szServer),CUSTOM_PATH);
        GetPrivateProfileStringA("SQL","Host","127.0.0.1",szServer2,sizeof(szServer2),CUSTOM_PATH);
        GetPrivateProfileStringA("SQL","User","sa",szUser,sizeof(szUser),CUSTOM_PATH);
        GetPrivateProfileStringA("SQL","Password","12345",szPassword,sizeof(szPassword),CUSTOM_PATH);
        GetPrivateProfileStringA("SQL","Database","MuOnline",szDatabase,sizeof(szDatabase),CUSTOM_PATH);
    
    
        if(!this->Connect())
        {
            MessageBoxA(0,"Failed to connect - Check your Exillum.ini!","Error",MB_OK);
            ::ExitProcess(0);
        } 
    }
    
    
    bool CSQLEx::Connect()
    {
        if(this->m_bConnected == 1)
        {
            return false;
        }
    
    
        if(SQL_SUCCEEDED(SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&this->m_SQLEnvironment)) == 0)
        {
            return false;
        }
    
    
        if(SQL_SUCCEEDED(SQLSetEnvAttr(this->m_SQLEnvironment,SQL_ATTR_ODBC_VERSION,(void *)SQL_OV_ODBC3,0)) == 0)
        {
            this->FreeHandle();    
            return false;
        }
    
    
        if(SQL_SUCCEEDED(SQLAllocHandle(SQL_HANDLE_DBC,this->m_SQLEnvironment,&this->m_SQLConnection)) == 0)
        {
            this->FreeHandle();     
            return false;
        }
    
    
        SQLSetConnectOption(this->m_SQLConnection,SQL_LOGIN_TIMEOUT,5);       
        SQLSetConnectOption(this->m_SQLConnection,SQL_CURSOR_TYPE,SQL_CURSOR_STATIC);
    
    
        SQLCHAR szConStrIn[1024],szConStrOut[1024];
        SQLSMALLINT iConOutSize = 0;
    
    
        sprintf((char*)szConStrIn,"DRIVER=%s; SERVER=%s; UID=%s; PWD=%s; DATABASE=%s;",szDriver,szServer2,szUser,szPassword,szDatabase);
    
    
        SQLRETURN Connect = SQLDriverConnect(this->m_SQLConnection,NULL,szConStrIn,SQL_NTS,szConStrOut,sizeof(szConStrOut),&iConOutSize,SQL_DRIVER_NOPROMPT);
    
    
        if(SQL_SUCCEEDED(Connect) == 0) 
        {
            this->FreeHandle();     
            return false;
        }
    
    
        this->m_bConnected = 1;
    
    
        return true;
    }
    
    
    bool CSQLEx::ConnectExt()
    {
        if(this->m_bConnected == 1)
            return false;
    
    
        if(SQL_SUCCEEDED(SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&this->m_SQLEnvironment)) == 0)
            return false;
    
    
        if(SQL_SUCCEEDED(SQLSetEnvAttr(this->m_SQLEnvironment,SQL_ATTR_ODBC_VERSION,(void *)SQL_OV_ODBC3,0)) == 0)
        {
            this->FreeHandle();     
            return false;
        }
    
    
        if(SQL_SUCCEEDED(SQLAllocHandle(SQL_HANDLE_DBC,this->m_SQLEnvironment,&this->m_SQLConnection)) == 0)
        {
            this->FreeHandle();    
            return false;
        }
    
    
        SQLSetConnectOption(this->m_SQLConnection,SQL_LOGIN_TIMEOUT,5);           
        SQLSetConnectOption(this->m_SQLConnection,SQL_CURSOR_TYPE,SQL_CURSOR_STATIC);
    
    
        SQLCHAR szConStrIn[1024],szConStrOut[1024];
        SQLSMALLINT iConOutSize = 0;
    
    
        sprintf((char*)szConStrIn,"DRIVER=%s; SERVER=%s; UID=%s; PWD=%s; DATABASE=%s;",szDriver,szServer2,szUser,szPassword,szDatabase);
    
    
        SQLRETURN Connect = SQLDriverConnect(this->m_SQLConnection,NULL,szConStrIn,SQL_NTS,szConStrOut,sizeof(szConStrOut),&iConOutSize,SQL_DRIVER_NOPROMPT);
    
    
        if(SQL_SUCCEEDED(Connect) == 0) 
        {
            this->FreeHandle();       
            return false;
        }
    
    
        this->m_bConnected = 1;
    
    
        return true;
    }
    
    
    void CSQLEx::Disconnect()
    {
        if(this->m_bConnected == 1)
        {
            SQLDisconnect(this->m_SQLConnection); 
            this->FreeHandle();
        }
    
    
        this->m_SQLConnection = NULL;
        this->m_SQLEnvironment = NULL;
    
    
        this->m_bConnected = 0;
    }
    
    
    void CSQLEx::FreeHandle()
    {
        if(this->m_SQLConnection != NULL)
            SQLFreeHandle(SQL_HANDLE_DBC,this->m_SQLConnection);
        
        if(this->m_SQLEnvironment != NULL)
            SQLFreeHandle(SQL_HANDLE_ENV,this->m_SQLEnvironment);
    }
    
    
    bool CSQLEx::Execute(char* szQuery,...)
    {
        if(this->m_bConnected == 0)
        {
            return false;
        }
    
    
        if(SQL_SUCCEEDED(SQLAllocHandle(SQL_HANDLE_STMT,this->m_SQLConnection,&this->m_STMT)) == 0)
        {
            return false;
        }
    
    
        char szTemp[1024];
    
    
        va_list pArguments;
    
    
        va_start(pArguments,szQuery);
        vsprintf(szTemp,szQuery,pArguments);
        va_end(pArguments);
    
    
        if(SQL_SUCCEEDED(SQLPrepare(this->m_STMT,(unsigned char*)szTemp,strlen(szTemp))) == 0)
        {
            return false;
        }
                
        SQLRETURN Execute = SQLExecute(this->m_STMT);
    
    
        if(Execute == SQL_SUCCESS || Execute == SQL_SUCCESS_WITH_INFO || Execute == SQL_NO_DATA)
        {
            if(SQLRowCount(this->m_STMT,&this->m_RowCount) != SQL_SUCCESS)
            {
                this->m_RowCount = 0;
            }
    
    
            if(SQLNumResultCols(this->m_STMT,(SQLSMALLINT*)&this->m_ColCount) != SQL_SUCCESS)
            {
                this->m_ColCount = 0;
            }
    
    
            return true;
        }
    
    
        return false;
    }
    
    
    
    
    char* CSQLEx::GetLastError()
    {
        char szError[1024];
    
    
        SQLCHAR     szState[20];
        SQLINTEGER  iNativeError;
        SQLSMALLINT iOutErrorSize;
    
    
        SQLError(this->m_SQLEnvironment,this->m_SQLConnection,this->m_STMT,szState,&iNativeError,(SQLCHAR*)szError,sizeof(szError),&iOutErrorSize);
    
    
        return &szError[0];
    }
    
    
    int CSQLEx::GetRow()
    {
        return this->m_RowCount;
    }
    
    
    int CSQLEx::GetCol()
    {
        return this->m_ColCount;
    }
    
    
    int CSQLEx::GetInt()
    {
        long lSize,lResult=0;
    
    
        while(true)
        {
            if(SQL_SUCCEEDED(SQLFetch(this->m_STMT)) == 0)
                break;
            
            if(SQL_SUCCEEDED(SQLGetData(this->m_STMT,1,SQL_C_LONG,&lResult,sizeof(long),&lSize)) == 0)
                break;
            
            return lResult;
        }
    
    
        return 0;
    }
    
    
    void CSQLEx::GetString(char *msg)
    {
        long lSize;
        char lResult[1024];
    
    
        while(true)
        {
            if(SQL_SUCCEEDED(SQLFetch(this->m_STMT)) == 0)
                break;
    
    
            if(SQL_SUCCEEDED(SQLGetData(this->m_STMT, 1, SQL_C_CHAR, &lResult,sizeof(lResult),&lSize)) == 0)
            {
                break;
            }
            else
            {
                memcpy(msg,lResult,lSize);
                msg[lSize] = '\0';
            }
        }
    }
    
    
    bool CSQLEx::FetchRow(char* out,int len)
    {
        long lSize;
    
    
        while(true)
        {
            if(SQL_SUCCEEDED(SQLFetch(this->m_STMT)) == 0)
                break;
    
    
            for(int n=0;n < this->m_ColCount;n++)
                if(SQL_SUCCEEDED(SQLGetData(this->m_STMT,(n+1),SQL_C_CHAR,&out[n],len,&lSize)) == 0)
                    break;
            
            return 1;
        }
    
    
        return 0;
    }
    stdafx.h
    Código:
    #ifndef __STDAFX_H__
    #define __STDAFX_H__
    
    
    #pragma once
    
    
    #define WIN32_LEAN_AND_MEAN
    
    
    #pragma warning(disable: 4018 4244 4805 4309 4995 4996)
    
    
    // Windows Header Files
    #include "windows.h"
    
    
    // C++ Runtime Header Files
    #include <fstream>
    #include <time.h>
    #include <process.h>
    #include <SQL.h>
    #include <SqlExt.h>
    
    // SQL
    #include "SQL.h"
    #define CUSTOM_PATH  ".\\GameServer.ini"
    
    
    #endif
    GameServer.ini
    Código:
    [SQL]
    Host=127.0.0.1
    User=sa
    Password=Contraseña
    Database=MuOnline

    y enla funcion de inicio agregas
    Código:
    MySQL.Load();

  4. The Following User Says Thank You to Warfox For This Useful Post:


  5. #3
    [IG] Leecher Avatar de xx12xx
    Ingreso
    22 ago, 10
    Mensajes
    12
    País
    Gracias
    6
    1 agradecimiento en 1 Post

    Re: [Proyecto] Alpha 0.96.40T - 97D

    Cita Iniciado por Warfox [Hola Invitado, necesitas registrarte para ver los links , Has click aquí para registrarte !!]
    yo uso esta para mi s3 sin ningun problema (con algunos cambios personales) para la conexion a la DB

    SQL.h
    Código:
    #ifndef _SQL_H
    #define _SQL_H
    
    
    class CSQLEx
    {
    public:
        CSQLEx();
        virtual ~CSQLEx();
    
    
        void Load();
        bool ConnectExt();
        bool Connect();
        void Disconnect();
        bool Execute(char* szQuery,...);
        char* GetLastError();
        void FreeHandle();
        int GetRow();
        int GetCol();
    
    
        int GetInt();
        void GetString(char* msg);
        bool FetchRow(char* out,int len);
        char FetchArray[1024][50];
        char*szDriver;
        char szServer[50];
        char szServer2[50];
        char szUser[50];
        char szPassword[50];
        char szDatabase[50];
    private:
        bool m_bConnected;
        HENV m_SQLEnvironment;
        HDBC m_SQLConnection;
        HSTMT m_STMT;
        long m_RowCount;
        long m_ColCount;
    };
    
    
    extern CSQLEx MySQL;
    
    
    #endif
    SQL.cpp
    Código:
    #include "Stdafx.h"
    
    
    
    
    CSQLEx MySQL;
    
    
    CSQLEx::CSQLEx()
    {
    }
    
    
    CSQLEx::~CSQLEx()
    {
        this->Disconnect();
    }
    
    
    void CSQLEx::Load()
    {
        szDriver="{SQL Server}";
        GetPrivateProfileStringA("SQL","Host","127.0.0.1",szServer,sizeof(szServer),CUSTOM_PATH);
        GetPrivateProfileStringA("SQL","Host","127.0.0.1",szServer2,sizeof(szServer2),CUSTOM_PATH);
        GetPrivateProfileStringA("SQL","User","sa",szUser,sizeof(szUser),CUSTOM_PATH);
        GetPrivateProfileStringA("SQL","Password","12345",szPassword,sizeof(szPassword),CUSTOM_PATH);
        GetPrivateProfileStringA("SQL","Database","MuOnline",szDatabase,sizeof(szDatabase),CUSTOM_PATH);
    
    
        if(!this->Connect())
        {
            MessageBoxA(0,"Failed to connect - Check your Exillum.ini!","Error",MB_OK);
            ::ExitProcess(0);
        } 
    }
    
    
    bool CSQLEx::Connect()
    {
        if(this->m_bConnected == 1)
        {
            return false;
        }
    
    
        if(SQL_SUCCEEDED(SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&this->m_SQLEnvironment)) == 0)
        {
            return false;
        }
    
    
        if(SQL_SUCCEEDED(SQLSetEnvAttr(this->m_SQLEnvironment,SQL_ATTR_ODBC_VERSION,(void *)SQL_OV_ODBC3,0)) == 0)
        {
            this->FreeHandle();    
            return false;
        }
    
    
        if(SQL_SUCCEEDED(SQLAllocHandle(SQL_HANDLE_DBC,this->m_SQLEnvironment,&this->m_SQLConnection)) == 0)
        {
            this->FreeHandle();     
            return false;
        }
    
    
        SQLSetConnectOption(this->m_SQLConnection,SQL_LOGIN_TIMEOUT,5);       
        SQLSetConnectOption(this->m_SQLConnection,SQL_CURSOR_TYPE,SQL_CURSOR_STATIC);
    
    
        SQLCHAR szConStrIn[1024],szConStrOut[1024];
        SQLSMALLINT iConOutSize = 0;
    
    
        sprintf((char*)szConStrIn,"DRIVER=%s; SERVER=%s; UID=%s; PWD=%s; DATABASE=%s;",szDriver,szServer2,szUser,szPassword,szDatabase);
    
    
        SQLRETURN Connect = SQLDriverConnect(this->m_SQLConnection,NULL,szConStrIn,SQL_NTS,szConStrOut,sizeof(szConStrOut),&iConOutSize,SQL_DRIVER_NOPROMPT);
    
    
        if(SQL_SUCCEEDED(Connect) == 0) 
        {
            this->FreeHandle();     
            return false;
        }
    
    
        this->m_bConnected = 1;
    
    
        return true;
    }
    
    
    bool CSQLEx::ConnectExt()
    {
        if(this->m_bConnected == 1)
            return false;
    
    
        if(SQL_SUCCEEDED(SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&this->m_SQLEnvironment)) == 0)
            return false;
    
    
        if(SQL_SUCCEEDED(SQLSetEnvAttr(this->m_SQLEnvironment,SQL_ATTR_ODBC_VERSION,(void *)SQL_OV_ODBC3,0)) == 0)
        {
            this->FreeHandle();     
            return false;
        }
    
    
        if(SQL_SUCCEEDED(SQLAllocHandle(SQL_HANDLE_DBC,this->m_SQLEnvironment,&this->m_SQLConnection)) == 0)
        {
            this->FreeHandle();    
            return false;
        }
    
    
        SQLSetConnectOption(this->m_SQLConnection,SQL_LOGIN_TIMEOUT,5);           
        SQLSetConnectOption(this->m_SQLConnection,SQL_CURSOR_TYPE,SQL_CURSOR_STATIC);
    
    
        SQLCHAR szConStrIn[1024],szConStrOut[1024];
        SQLSMALLINT iConOutSize = 0;
    
    
        sprintf((char*)szConStrIn,"DRIVER=%s; SERVER=%s; UID=%s; PWD=%s; DATABASE=%s;",szDriver,szServer2,szUser,szPassword,szDatabase);
    
    
        SQLRETURN Connect = SQLDriverConnect(this->m_SQLConnection,NULL,szConStrIn,SQL_NTS,szConStrOut,sizeof(szConStrOut),&iConOutSize,SQL_DRIVER_NOPROMPT);
    
    
        if(SQL_SUCCEEDED(Connect) == 0) 
        {
            this->FreeHandle();       
            return false;
        }
    
    
        this->m_bConnected = 1;
    
    
        return true;
    }
    
    
    void CSQLEx::Disconnect()
    {
        if(this->m_bConnected == 1)
        {
            SQLDisconnect(this->m_SQLConnection); 
            this->FreeHandle();
        }
    
    
        this->m_SQLConnection = NULL;
        this->m_SQLEnvironment = NULL;
    
    
        this->m_bConnected = 0;
    }
    
    
    void CSQLEx::FreeHandle()
    {
        if(this->m_SQLConnection != NULL)
            SQLFreeHandle(SQL_HANDLE_DBC,this->m_SQLConnection);
        
        if(this->m_SQLEnvironment != NULL)
            SQLFreeHandle(SQL_HANDLE_ENV,this->m_SQLEnvironment);
    }
    
    
    bool CSQLEx::Execute(char* szQuery,...)
    {
        if(this->m_bConnected == 0)
        {
            return false;
        }
    
    
        if(SQL_SUCCEEDED(SQLAllocHandle(SQL_HANDLE_STMT,this->m_SQLConnection,&this->m_STMT)) == 0)
        {
            return false;
        }
    
    
        char szTemp[1024];
    
    
        va_list pArguments;
    
    
        va_start(pArguments,szQuery);
        vsprintf(szTemp,szQuery,pArguments);
        va_end(pArguments);
    
    
        if(SQL_SUCCEEDED(SQLPrepare(this->m_STMT,(unsigned char*)szTemp,strlen(szTemp))) == 0)
        {
            return false;
        }
                
        SQLRETURN Execute = SQLExecute(this->m_STMT);
    
    
        if(Execute == SQL_SUCCESS || Execute == SQL_SUCCESS_WITH_INFO || Execute == SQL_NO_DATA)
        {
            if(SQLRowCount(this->m_STMT,&this->m_RowCount) != SQL_SUCCESS)
            {
                this->m_RowCount = 0;
            }
    
    
            if(SQLNumResultCols(this->m_STMT,(SQLSMALLINT*)&this->m_ColCount) != SQL_SUCCESS)
            {
                this->m_ColCount = 0;
            }
    
    
            return true;
        }
    
    
        return false;
    }
    
    
    
    
    char* CSQLEx::GetLastError()
    {
        char szError[1024];
    
    
        SQLCHAR     szState[20];
        SQLINTEGER  iNativeError;
        SQLSMALLINT iOutErrorSize;
    
    
        SQLError(this->m_SQLEnvironment,this->m_SQLConnection,this->m_STMT,szState,&iNativeError,(SQLCHAR*)szError,sizeof(szError),&iOutErrorSize);
    
    
        return &szError[0];
    }
    
    
    int CSQLEx::GetRow()
    {
        return this->m_RowCount;
    }
    
    
    int CSQLEx::GetCol()
    {
        return this->m_ColCount;
    }
    
    
    int CSQLEx::GetInt()
    {
        long lSize,lResult=0;
    
    
        while(true)
        {
            if(SQL_SUCCEEDED(SQLFetch(this->m_STMT)) == 0)
                break;
            
            if(SQL_SUCCEEDED(SQLGetData(this->m_STMT,1,SQL_C_LONG,&lResult,sizeof(long),&lSize)) == 0)
                break;
            
            return lResult;
        }
    
    
        return 0;
    }
    
    
    void CSQLEx::GetString(char *msg)
    {
        long lSize;
        char lResult[1024];
    
    
        while(true)
        {
            if(SQL_SUCCEEDED(SQLFetch(this->m_STMT)) == 0)
                break;
    
    
            if(SQL_SUCCEEDED(SQLGetData(this->m_STMT, 1, SQL_C_CHAR, &lResult,sizeof(lResult),&lSize)) == 0)
            {
                break;
            }
            else
            {
                memcpy(msg,lResult,lSize);
                msg[lSize] = '\0';
            }
        }
    }
    
    
    bool CSQLEx::FetchRow(char* out,int len)
    {
        long lSize;
    
    
        while(true)
        {
            if(SQL_SUCCEEDED(SQLFetch(this->m_STMT)) == 0)
                break;
    
    
            for(int n=0;n < this->m_ColCount;n++)
                if(SQL_SUCCEEDED(SQLGetData(this->m_STMT,(n+1),SQL_C_CHAR,&out[n],len,&lSize)) == 0)
                    break;
            
            return 1;
        }
    
    
        return 0;
    }
    stdafx.h
    Código:
    #ifndef __STDAFX_H__
    #define __STDAFX_H__
    
    
    #pragma once
    
    
    #define WIN32_LEAN_AND_MEAN
    
    
    #pragma warning(disable: 4018 4244 4805 4309 4995 4996)
    
    
    // Windows Header Files
    #include "windows.h"
    
    
    // C++ Runtime Header Files
    #include <fstream>
    #include <time.h>
    #include <process.h>
    #include <SQL.h>
    #include <SqlExt.h>
    
    // SQL
    #include "SQL.h"
    #define CUSTOM_PATH  ".\\GameServer.ini"
    
    
    #endif
    GameServer.ini
    Código:
    [SQL]
    Host=127.0.0.1
    User=sa
    Password=Contraseña
    Database=MuOnline

    y enla funcion de inicio agregas
    Código:
    MySQL.Load();
    Muchas gracias de nuevo , ya lo estoy por probar, te aviso como me fue

  6. The Following User Says Thank You to xx12xx For This Useful Post:


  7. #4
    [IG] Leecher Avatar de xx12xx
    Ingreso
    22 ago, 10
    Mensajes
    12
    País
    Gracias
    6
    1 agradecimiento en 1 Post

    Re: [Proyecto] Alpha 0.96.40T - 97D

    Funciono la conexion SQL muchas gracias Warfox


 

Etiquetas para este tema

Marcadores

Permisos de publicación

  • No puedes crear nuevos temas
  • No puedes responder temas
  • No puedes subir archivos adjuntos
  • No puedes editar tus mensajes
  •