Jump to content
  • 0

pomoc MySQL


MainiiK

Dotaz

Zdravím.

Momentálně se snažím propojit databázi se serverem. Jsem v tomto vcelku nový a proto jsem samozřejmě i podle tutoriálu měl v kódu nějaké chyby. Ty se mi avšak podařilo opravit, ale zbývají mi tyto chyby a opravdu nevím, co na tom už opravit. Je možný, že pro někoho to bude jasná věc, ale pro mě ne. Moc prosím o pomoc a zároveň děkuju, pokud se zde někdo takový najde.

Chyba při převodu na amx:
(96) : warning 215: expression has no effect
(96) : error 001: expected token: ";", but found "]"
(96) : error 029: invalid expression, assumed zero
(96) : fatal error 107: too many error messages on one line

Řádek 96:

 

public OnGameModeExit()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    SavePlayer(i);
    PlayerInfo[i][sID] = -1;        // Řádek 96
    }
 
    mysql_close(SQL);
    TextDrawDestroy(Textdraw0);
    return 1;
}
Link to comment
Share on other sites

7 odpovědí na tuto otázku

Recommended Posts

  • 3
před 20hodinami, MainiiK said:

Myslíš toto?

 

#include <a_samp>
#include <core>
#include <float>
#include <a_mysql>
new Text:Textdraw0;
new MySQL:SQL;
#define DIALOG_LOGIN 1
#define HOST     "XXXX"
#define PASS     "XXXXX"
#define USER     "XXXXX"
#define DB         "XXXXX"
#define PlayerInfo
#if defined FILTERSCRIPT

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT


new bool registered[MAX_PLAYERS];

enum Player_Info
{
    sID,
    pPassword
    pMoney,
    pLevel,
    pSkin
};
new PlayerInfo[MAX_PLAYERS][Player_Info];

Nechybí ti v enumu Player_Info čárka za proměnnou pPassword? 

Link to comment
Share on other sites

  • 0

Myslíš toto?

 

#include <a_samp>
#include <core>
#include <float>
#include <a_mysql>
new Text:Textdraw0;
new MySQL:SQL;
#define DIALOG_LOGIN 1
#define HOST     "XXXX"
#define PASS     "XXXXX"
#define USER     "XXXXX"
#define DB         "XXXXX"
#define PlayerInfo
#if defined FILTERSCRIPT

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT


new bool registered[MAX_PLAYERS];

enum Player_Info
{
    sID,
    pPassword
    pMoney,
    pLevel,
    pSkin
};
new PlayerInfo[MAX_PLAYERS][Player_Info];

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...