SA-MP Forums Archive
Registration ain't showing... Even ain' t printing if the database is connected... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Registration ain't showing... Even ain' t printing if the database is connected... (/showthread.php?tid=503336)



Registration ain't showing... Even ain' t printing if the database is connected... - Scrillex - 29.03.2014

Here is the script..


Here you can see the script

So basically registration and login ain't showing up... Idk why..

Thank you for your support and time..

With best regards Scrillex.


Re: Registration ain't showing... Even ain' t printing if the database is connected... - EiresJason - 29.03.2014

Not really sure about how exactly MySQL works but would using..
pawn Код:
mysql_tquery(mysql, query, "OnAccountCheck", "i", playerid);
be the same as..
pawn Код:
OnAccountCheck(playerid);
?

I've no idea what mysql_tquery actually is so..

You could always replace it with OnAccountCheck(playerid); and see if it works.


Re: Registration ain't showing... Even ain' t printing if the database is connected... - Scrillex - 29.03.2014

mysql_tquery(mysql, query, "OnAccountCheck", "i", playerid); i doesn't stand for player in this case...


Re: Registration ain't showing... Even ain' t printing if the database is connected... - EiresJason - 29.03.2014

Did you try this?
pawn Код:
public OnPlayerConnect(playerid)
{
    //all your other code
    OnAccountCheck(playerid);
}



Re: Registration ain't showing... Even ain' t printing if the database is connected... - Scrillex - 29.03.2014

There is another problem not that..

pawn Код:
[06:18:11] [DEBUG] mysql_format - connection: 1, len: 300, format: "SELECT `Password`, `ID` FROM `playerdata` WHERE `Username` = '%e' LIMIT 1"
[06:18:11] [DEBUG] mysql_tquery - connection: 1, query: "SELECT `Password`, `ID` FROM `playerdata` WHERE `Username` = 'Ja", callback: "OnAccountCheck", format: "i"
[06:18:11] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - starting query execution
[06:18:11] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - query was successfully executed within 0.722 milliseconds
[06:18:11] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[06:18:11] [DEBUG] Calling callback "OnAccountCheck"..
[06:18:11] [DEBUG] cache_get_data - connection: 1
[06:18:11] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[06:18:15] [DEBUG] mysql_format - connection: 1, len: 300, format: "INSERT INTO `playerdata` (`Username`, `Password`, `IP`, `Admin`, `VIP`, `Level`, `Rank`, `Group`, `PosX` ,`PosY`, `PosZ`, `Hours..."
[06:18:15] [ERROR] mysql_format - destination size is too small
[06:18:15] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO `playerdata` (`Username`, `Password`, `IP`, `Admin`,", callback: "OnAccountRegister", format: "i"
[06:18:15] [DEBUG] CMySQLQuery::Execute[OnAccountRegister] - starting query execution
[06:18:15] [ERROR] CMySQLQuery::Execute[OnAccountRegister] - (error #1064) 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 ''F4F2B88E97F0FA3B32C6AC7D373F9D7E31A95547A32430DC68BF1B05B41017174121BA0AF744328' at line 1
[06:18:15] [DEBUG] CMySQLQuery::Execute[OnAccountRegister] - error will be triggered in OnQueryError
[06:18:21] [DEBUG] mysql_format - connection: 1, len: 300, format: "UPDATE `playerdata` SET `Admin`=%d, `VIP`=%d, `Level`=%d, `Rank`=%d,`Group`=%d, `posX`=%f, `posY`=%f, `posZ`=%f, `Hours`=%d, `Mi..."
[06:18:21] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `playerdata` SET `Admin`=0, `VIP`=0, `Level`=0, `Rank`=0,", callback: "(null)", format: "(null)"
[06:18:21] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[06:18:21] [ERROR] CMySQLQuery::Execute[] - (error #1064) 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 'WHERE `ID`=0' at line 1
ID is set as auto increment and primary key....