[Problem] SQL , Server crashes
#1

After a few hours ,i "instaled" the myqsol on an normal gf , but i have the next problem : When i attemp to /login into the account , the server crashes
pawn Код:
if (strcmp(cmd, "/login", true) ==0 )
    {
      if(IsPlayerConnected(playerid))
      {
        new tmppass[64];
            if(gPlayerLogged[playerid] == 1)
            {
                SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "SERVER: You are already logged in.");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "USAGE: /login [password]");
                return 1;
            }
            strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
            //Encrypt(tmppass);
            OnPlayerLogin(playerid,tmppass);
        }
        return 1;
    }
Код:
public public OnPlayerLogin(playerid,password[])
http://pastebin.com/m73f1623
The /register works fine , but the login doesn't .
Please help , i need this as soon as possibile

Or if you have an tutorial how to instal myqsol db on normal script i will apriciate.
Reply
#2

Edit:Sorry, Cookie hasnt read
Reply
#3

http://pastebin.com/m73f1623

Ps It was in the first post too
Reply
#4

pawn Код:
samp_mysql_strtok(Field, "|", Data);
        while (samp_mysql_strtok(Field, "|", "")==1)
shouldnt it be

pawn Код:
samp_mysql_strtok(Field, ",", Data);
        while (samp_mysql_strtok(Field, ",")==1)
Reply
#5

pawn Код:
while (samp_mysql_strtok(Field, ",")==1)
Number of arguments doesn't mach the definition
Reply
#6

Bump!
Reply
#7

Read forum rules.
Quote:
Originally Posted by ►☺◄©ookie►☺◄
pawn Код:
samp_mysql_strtok(Field, "|", Data);
        while (samp_mysql_strtok(Field, "|", "")==1)
shouldnt it be

pawn Код:
samp_mysql_strtok(Field, ",", Data);
        while (samp_mysql_strtok(Field, ",")==1)
Quote:
Originally Posted by Dj_maryo1993
pawn Код:
while (samp_mysql_strtok(Field, ",")==1)
Number of arguments doesn't mach the definition
wtf?.. There is a | between fields, not a ",".. This is so stupid, you better stay away from this topic.


Where's the OnPlayerLogin code?
Reply
#8

http://pastebin.com/m73f1623

It was in the first post too .
Reply
#9

Com-on , it's gotta be someone that had instaled the myqsol on gf
Reply
#10

Srry for 3xpost
Код:
Error in mysql_query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Char=0,ContractTime=0 WHERE id=0' at line 1
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)