Jump to content
  • 0
Sign in to follow this  
zonga

ajutor va rog e urgent

Question

buna ziua am o problema la sv meu de samp azi am facut live si au intrat multi playeri si cand sa bage parola le dadea wrong password pe uni i lasa dar pe alti nu si am bagat din nou baza de date si imi da erroarea asta va rog ma puteti ajuta ?

 

 

Error

SQL query:

-- -- Bază de date: `hgamero_php` -- -- -------------------------------------------------------- -- -- Structură tabel pentru tabel `aplications` -- CREATE TABLE `aplications` ( `id` int(11) NOT NULL, `name` varchar(50) NOT NULL, `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `status` int(69) NOT NULL DEFAULT '0', `factionid` int(69) NOT NULL DEFAULT '0', `playerid` int(69) NOT NULL, `actionby` varchar(50) NOT NULL, `r1` varchar(128) NOT NULL, `r2` varchar(128) NOT NULL, `r3` varchar(128) NOT NULL, `r4` varchar(128) NOT NULL, `r5` varchar(128) NOT NULL, `r6` varchar(128) NOT NULL, `r7` varchar(128) NOT NULL, `r8` varchar(128) NOT NULL, `r9` varchar(128) NOT NULL, `r10` varchar(128) NOT NULL, `r11` varchar(128) NOT NULL, `r12` varchar(128) NOT NULL, `r13` varchar(128) NOT NULL, `r14` varchar(128) NOT NULL, `r15` varchar(128) NOT NULL, `q1` varchar(128) NOT NULL, `q2` varchar(128) NOT NULL, `q3` varchar(128) NOT NULL, `q4`[...]

MySQL said: Documentation

#1050 - Table 'aplications' already exists 

 

 

 

daca e o sa pun si baza in caz ca ma puteti ajuta Multumesc

 

Share this post


Link to post
Share on other sites

13 answers to this question

Recommended Posts

  • 0

eroarea asta mai apare atunci cand ai sters ceva sau ai adaugat ceva una peste alta verifica daca la aplications  este totul ok

Share this post


Link to post
Share on other sites
  • 0

da este ok dar chestia aia ce am spus ca am facut live si au intrat multi playeri si nu mergea sa se conecteze le dadea wrong password de la ce ar putea fii ????

 

Share this post


Link to post
Share on other sites
  • 0
Acum 23 ore, zonga a spus:

#1050 - Table 'aplications' already exists 

Tabelul "aplication" deja exista... oricum chestia cu "wrong password" e din script nu din MySQL. 

Te rog sa postezi codul de la login.

Share this post


Link to post
Share on other sites
  • 0

public OnGameModeInit()
{
    mysql_log(LOG_ERROR | LOG_WARNING, LOG_TYPE_HTML);
    print("---------- SERVER START ----------");
    print("[debug] OnGameModeInit()");
    SQL = mysql_connect("", "", "", "");
    printf("mysql_connect: %d",SQL);
    print("----------------------------------------------------");

 

acesta ?

Share this post


Link to post
Share on other sites
  • 0
Acum 1 minut, zonga a spus:

SQL = mysql_connect("", "", "", "");

Nu are la ce baza de date sa se connecteze...si ma refeream la scriptu care verifica parola jucatorului

Share this post


Link to post
Share on other sites
  • 0

e conectata baza numa ca am sters eu datele de acolo cand am dat paste 

dar nu stiu unde gasesc ce-a ce zici tu cu scriptu 

Share this post


Link to post
Share on other sites
  • 0

Atunci nu avem cum sa te ajutam. Revino cu un reply cand gasesti codul sursa pentru logare.

 

PS: Puteai preciza ca ai sters datele.

Share this post


Link to post
Share on other sites
  • 0

public OnPlayerRegister(playerid, password[])
{
    if(IsPlayerConnected(playerid))
    {
        new playername3[MAX_PLAYER_NAME];
        UpdateProgressBar(playerid);
        GetPlayerName(playerid, playername3, sizeof(playername3));
        new Str[200];
        mysql_format(SQL,Str,sizeof(Str),"INSERT INTO `users` (`name`,`password`) VALUES ('%s','%s')",playername3,password);
        mysql_tquery(SQL,Str,"","");
        strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
        PlayerInfo[playerid][pCash] = GetPlayerCash(playerid);
        GetPlayerHealthEx(playerid,PlayerInfo[playerid][pHealth]);
        if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
        {
             PlayerInfo[playerid][pPos_x] = 2246.6;
             PlayerInfo[playerid][pPos_y] = -1161.9;
             PlayerInfo[playerid][pPos_z] = 1029.7;
        }
        if(Spectate[playerid] != -1)
        {
            PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
            PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
            PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
            PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
            PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
        }
        new str[128];
        mysql_format(SQL,str,128,"UPDATE users SET `pHealth`='%.1f' WHERE `name`='%s'",PlayerInfo[playerid][pHealth],PlayerInfo[playerid][pNormalName]);
        mysql_tquery(SQL,str,"","");
        ShowPlayerDialog(playerid,DIALOG_LOGIN2,DIALOG_STYLE_PASSWORD,"SERVER: Login","Welcome to the RED.REDPLAY.RO  Server.\n\nPlease enter your password below!","Login","Cancel");
        return 1;

Share this post


Link to post
Share on other sites
  • 0

public OnPlayerLogin(playerid,password[])
{
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    GameTextForPlayer(playerid, "~w~LOADING...~n~~y~CHECKING THE PASSWORD", 700, 3);
    new playerip[16];
    GetPlayerIp(playerid,playerip,sizeof(playerip));
    if(NumIp(playerip, playerid) >= 50 && !IsBotOnIP(playerip))
    {
         SendClientMessage(playerid, COLOR_LIGHTRED, "There are already 2 players connected with same IP.");
         Kick(playerid);
         return 1;

 

Share this post


Link to post
Share on other sites
  • 0

OnPlayerLogin nu este complet din cate vad plus nu este postat pana la codul unde verifica functie , si foloseste "Cod" pentru postarea codului , nu mai fa dublu-triplu post etc , ca primesti warn.

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

This site uses cookies. By continuing browsing, you agree to the use of this information. For more details, see Terms of Use and Privacy Policy.