Help me in my Error About Mysql
#1

This is the Server Log.
Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3z, ©2005-2014 SA-MP Team

[15:57:54] filterscripts = ""  (string)
[15:57:54] 
[15:57:54] Server Plugins
[15:57:54] --------------
[15:57:54]  Loading plugin: streamer.dll
[15:57:54] 

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[15:57:54]   Loaded.
[15:57:54]  Loading plugin: sscanf.dll
[15:57:54] 

[15:57:54]  ===============================

[15:57:54]       sscanf plugin loaded.     

[15:57:54]    © 2009 Alex "******" Cole

[15:57:54]    0.3d-R2 500 Players "dnee"

[15:57:54]  ===============================

[15:57:54]   Loaded.
[15:57:54]  Loading plugin: mysql.dll
[15:57:54] 

  > MySQL plugin R5 successfully loaded.

[15:57:54]   Loaded.
[15:57:54]  Loaded 3 plugins.

[15:57:54] 
[15:57:54] Filterscripts
[15:57:54] ---------------
[15:57:54]   Loaded 0 filterscripts.

[15:57:54] [DayZ Loot ( LV )] Item spawn finished (Total Items: 593) ( Time: 15:57:54)
[15:57:54] [DayZ Loot ( SF )] Item spawn finished (Total Items: 438) ( Time: 15:57:54)
[15:57:54] [DayZ Loot ( LS )] Item spawn finished (Total Items: 620) ( Time: 15:57:54)
[15:57:54] [DayZ Loot] Item Spawned ! Total Items: 1651
[15:57:55] [DayZ - MySQL] Can't connect to MySQL Database | Trying Again !
[15:57:56] [DayZ - MySQL] Can't connect to MySQL Database | Server Closed !
[15:57:56]  
[15:57:56]  ====[ DayZ Standalone ]==== 
[15:57:56]  Made by [UKF]xNeo | All rights by [UKF]xNeo 
[15:57:56]  Only for DayZ Standalone Server 
[15:57:56]  Skype: dennis.letsch2 | Germany 
[15:57:56]  ==============================
[15:57:56] Number of vehicle models: 0
[15:57:56] --- Server Shutting Down.
[15:57:56] 

*** Streamer Plugin v2.6.1 by Incognito unloaded ***

[15:57:56] 

[15:57:56]  ===============================

[15:57:56]      sscanf plugin unloaded.    

[15:57:56]  ===============================

[15:57:56] 

  > MySQL plugin unloaded.
This is the inside of my pawno.

pawn Код:
stock Connect_To_Database(){
    mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
    if(mysql_ping() == 1){
        print("[DayZ - MySQL] Connect to MySQL Database successfully !");
        return true;
    }
    else
    {
        print("[DayZ - MySQL] Can't connect to MySQL Database | Trying Again !");
        mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
        if(mysql_ping() == 1){
            print("[DayZ - MySQL] Connect to MySQL Database successfully !");
            return true;
        }
        else{
            print("[DayZ - MySQL] Can't connect to MySQL Database | Server Closed !");
            SendRconCommand("exit");
            return true;
        }
    }
}
Please help in this i can't fix this any one help me.
Reply
#2

Well, try this :

pawn Код:
stock Connect_To_Database(){
    mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
    if(mysql_errno() != 0){
        print("[DayZ - MySQL] Connect to MySQL Database successfully !");
    }
    else
    {
        print("[DayZ - MySQL] Can't connect to MySQL Database | Trying Again !");
       
        mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
        if(mysql_errno() != 1){
            print("[DayZ - MySQL] Connect to MySQL Database successfully !");
      }
      else{
            print("[DayZ - MySQL] Can't connect to MySQL Database | Server Closed !");
            SendRconCommand("exit");
        }
    }
    return true;
}
Reply
#3

Код:
C:\Users\888\Desktop\DayZ\DayZ Standalone\gamemodes\LOTD.pwn(3500) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#4

C:\Users\888\Desktop\DayZ\DayZ Standalone\gamemodes\LOTD.pwn(3500) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)