Login

Started by [VSS]Shawn, Jun 23, 2015, 06:19 PM

Previous topic - Next topic

[VSS]Shawn

Hello Guys I am facing problem in Login System When Ever i do /login wrong pass its say wrong password but when i do /login correctpassword it give error in console

Trying to Set Null
and Give Line in Login System


function Login(player)
{

local q = QuerySQL( db, "SELECT * FROM Accounts WHERE Name='" + player.Name + "'" );
if ( GetSQLColumnData( q, 0 ) != null )
{
Here >>>>>>>>>>>>>>>>> pinfo[ player.ID ].Level = GetSQLColumnData( q, 3 );     
pinfo[ player.ID ].cash = GetSQLColumnData( q, 5 );
pinfo[ player.ID ].Bank = GetSQLColumnData( q, 6 );
pinfo[ player.ID ].WantedLevel = GetSQLColumnData( q, 13 );  
pinfo[ player.ID ].Job = GetSQLColumnData( q, 14 );
pinfo[ player.ID ].Warns = GetSQLColumnData( q, 10 );
pinfo[ player.ID ].MCount = GetSQLColumnData( q, 17 );
pinfo[ player.ID ].GCount = GetSQLColumnData( q, 15 );
pinfo[ player.ID ].VCount = GetSQLColumnData( q, 16 );
pinfo[ player.ID ].PhCount = GetSQLColumnData( q, 7 );
pinfo[ player.ID ].PCount = GetSQLColumnData( q, 11 );
}
ClientMessage ("Your Logged In Successfully", player ,255,255,0);
QuerySQL(db, "UPDATE Accounts SET IP='" + player.IP + "' WHERE Name='" + player.Name + "'");
QuerySQL(db, "UPDATE Accounts SET LastLogin='" + GetFullTime()+ "' WHERE Name='" + player.Name + "'");
binfo[player.ID].logged=true; 
}

.

Which line? I don't plan on reading all that crap and trying to guess. And I can't test it either since I'm missing your environment.

For f* sake if you people can't find the line number you should at least post a screenshot of the console output that encapsulates the entire error output.
.

Thijn

Do you actually assign a class to that pinfo array?

[VSS]Shawn

Yeah Thijn i add this on pinfo class