Jump to content

Question

Posted (edited)

Problema intalnita (descriere):Sa facut update la mysql, sa trecut de pe strcmp pe zcmd..Acum cand intru pe sv nu-mi mai apare casuta de register.Defapt nu apare nimic.Doar connected to "numele serverului" si ramane asa.
Ero(area / rile) / warning-(ul / urile):---------
Liniile de cod / sursa / script-ul:
Imagini / Video (optional):
Ati incercat sa rezolvati singur?:DA, dar nu reusesc sa gasesc problema.

 

GM-ul http://pastebin.com/Si2dDdjX

Va rog sa va uitati voi prin gm ca nu-i gasesc problema

Edited by Vendetta5.11

18 answers to this question

Recommended Posts

  • 0
Posted (edited)

Ori sunt eu prea prost ori nu e asta problema....Asta e ce am in connections.inc .Poti sa le stergi tu te rog , poate tu le stergi alfel si la tine merge:|

 

#define mysql_host "127.0.0.1"

#define mysql_user "root"

#define mysql_password ""

#define mysql_database "w3op"

new handle;

new rows, fields;

new temp[256];

forward MySQLConnect();

public MySQLConnect()

{

    handle = mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password);

    if(handle && mysql_errno(handle) == 0)

    {

        printf("[MYSQL]: Connection to database (%s) was established!", mysql_database);

    }

    else

    {

        printf("[MYSQL]: Connection to database (%s) failed!", mysql_database);

        SendRconCommand("exit");

    }

    return 1;

}

Greseala mea, imi pare rau, in GM nu vedeam unde sunt defineurile pentru conectarea la MySQL asa ca am facut eu altele.

Am reparat asta acum ^^.

 

Link: http://www.girlshare.ro/34148222.9

Edited by KnowN .

242086.png

  • 0
Posted

mysql_log:

 

[09:12:46] [ERROR] CMySQLConnection::Connect - (error #2003) Can't connect to MySQL server on 'localhost' (10061)
[09:25:06] [ERROR] CMySQLConnection::Connect - (error #2005) Unknown MySQL server host 'ip-ul hostului mysql' (11004)
[10:17:55] [ERROR] CMySQLConnection::Connect - (error #2005) Unknown MySQL server host 'ip-ul hostului mysql' (11004)
[13:32:53] [ERROR] CMySQLConnection::Connect - (error #2005) Unknown MySQL server host 'ip-ul hostului mysql' (11004)
[13:33:26] [ERROR] CMySQLConnection::Connect - (error #2005) Unknown MySQL server host 'ip-ul hostului mysql' (11004)
[13:33:26] [ERROR] CMySQLConnection::Connect - (error #2005) Unknown MySQL server host 'ip-ul hostului mysql' (11004)
[13:33:26] [ERROR] CMySQLConnection::Connect - (error #2005) Unknown MySQL server host 'ip-ul hostului mysql' (11004)
[13:45:56] [ERROR] CMySQLConnection::Connect - (error #2005) Unknown MySQL server host 'ip-ul hostului mysql' (11004)
[13:47:48] [ERROR] CMySQLConnection::Connect - (error #1130) Host 'Emilian-PC' is not allowed to connect to this MySQL server

Nu am idee de ce da asta.Cu gm-ul needitat merge.

 

sever_log:

 

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

[14:27:28] filterscripts = ""  (string)
[14:27:28]
[14:27:28] Server Plugins
[14:27:28] --------------
[14:27:28]  Loading plugin: mysql
[14:27:28]  >> plugin.mysql: R39-2 successfully loaded.
[14:27:28]   Loaded.
[14:27:28]  Loading plugin: streamer
[14:27:28]

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

[14:27:28]   Loaded.
[14:27:28]  Loading plugin: sscanf
[14:27:28]

[14:27:28]  ===============================

[14:27:28]       sscanf plugin loaded.     

[14:27:28]          Version:  2.8.1        

[14:27:28]    © 2012 Alex "Y_Less" Cole  

[14:27:28]  ===============================

[14:27:28]   Loaded.
[14:27:28]  Loaded 3 plugins.

[14:27:28]
[14:27:28] Filterscripts
[14:27:28] ---------------
[14:27:28]   Loaded 0 filterscripts.

[14:27:28] =======================================================
[14:27:28]            > MySQL System <
[14:27:28] =======================================================
[14:27:28] [MySQL] Conectare la ('localhost') cu ('root') la baza de date ('w3op').
[14:27:28] [MySQL] Conectarea la ('localhost') sa stabilit cu succes !
[14:27:28] [MySQL] Baza de date ('w3op') a fost selectata !

[14:27:28]  
[14:27:28]  
[14:27:28]  RPG: v0.2 Beta LS-LV-SF
[14:27:28] _____________________
[14:27:28] Number of vehicle models: 1
[14:28:11] Incoming connection: 79.112.10.7:53519
[14:28:11] [join] Alphonse has joined the server (0:79.112.10.7)
[14:31:25] [part] Alphonse has left the server (0:2)

  • 0
Posted (edited)

In accounts.inc ai comentat #include <connection>

Nu inteleg la ce te referi cand spui daca am comentat:| ...te referi daca e trecut #include <connection> ?

 

....Asa incepe accounts.inc :

 

// This gamemode is made by WopsS.

#include <connection>

forward Update(playerid, type);

#define pLevelu                1

#define pAdminu                2

#define pHelperu            3

#define pCashu                4

#define pAccountu            5

#define pEmailu                6

#define pRegistredu            7

#define pTutorialu            8

#define pSexu                9

..........

Edited by Vendetta5.11
  • 0
  • Administrator
Posted

Daca inainte lui ai //, il ai cumva acolo?

 

Daca da, sterge-l si compileaza gamemode-ul.

  • 0
Posted (edited)

Daca sterg #include <connection> din accounts.inc primesc eroare la compilare.

 

C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(47) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(48) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(52) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(53) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(57) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(58) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(62) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(63) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(67) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(68) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(72) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(73) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(77) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(78) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(82) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(83) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(87) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(88) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(92) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(93) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(97) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(98) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(102) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(103) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(107) : error 017: undefined symbol "handle"
C:UsersAcerDesktopMy ProjectRPGpawnoincludeaccounts.inc(108) : error 017: undefined symbol "handle"

Compilation aborted.Pawn compiler 3.2.3664              Copyright © 1997-2006, ITB CompuPhase


26 Errors.

 

 

Chiar nu pot sa inteleg ce are:| se conecteaza la baza de date.Serverul porneste.in server_log totul e ok, etc.Sunt incepator deci mie greu sa-mi dau seama ce are.De la 12 imi bat capu' si nu gasesc rezolvarea.Cand am spus si eu ca dupa ce il vad pe zcmd si cu ultima versiune de mysql ma apuc sa fac factiuni, masini, case , etc. am luat teapa ca nu merge.
 

Edited by Vendetta5.11
  • 0
  • Administrator
Posted

Atunci modifica in fisierul connection conexiunea si sterge tot ce tine de conexiune de la OnGameModeInit. Acolo am vazut ca scrie ceva made by KnowN si am crezut ca a modificat tot.

  • 0
Posted

Ori sunt eu prea prost ori nu e asta problema....Asta e ce am in connections.inc .Poti sa le stergi tu te rog , poate tu le stergi alfel si la tine merge:|

 

#define mysql_host "127.0.0.1"
#define mysql_user "root"
#define mysql_password ""
#define mysql_database "w3op"

new handle;
new rows, fields;
new temp[256];

forward MySQLConnect();

public MySQLConnect()
{
    handle = mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password);

    if(handle && mysql_errno(handle) == 0)
    {
        printf("[MYSQL]: Connection to database (%s) was established!", mysql_database);
    }
    else
    {
        printf("[MYSQL]: Connection to database (%s) failed!", mysql_database);
        SendRconCommand("exit");
    }

    return 1;
}

  • 0
  • Administrator
Posted

Daca le sterg, trebuie sa modifici tot script-ul.

 

Sau poti sa pui inainte de OnGameModeInit

new handle;

si la OnGameModeInit  unde ai mysql_connect pui handle = mysql_connect si stergi #include <connection>

  • 0
Posted

Multumesc frumos...problema acuma e ca daca dau compile da eroare si spune ca handle mai este odata .E in include iar daca il sterg din include da iar 26 de erori cum am pus mai sus.am sters new handle din gm si l am lasat pe ala din include dar am un warning.Probabil cand sa updatat mysql si zcmd si sa umblat in gm s au amestecat cele din gm cu include.Am sa vad eu cum o rezolv.M-ai ajutat mult.Multumesc din nou.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.