SQLite problem
#1

Just working on my SQL gamemode something small, but i never had like this problem!When i Login automatic i get kicked beacuse this stock frist check if(db_num_rows(Result)) else kick(i always get kicked)!Somebody help

Код:
stock LoadPlayer(playerid)
{
   	new Query[75], DBResult: Result;
   	format(Query, sizeof(Query), "SELECT * FROM players WHERE playername= '%s' LIMIT 0, 1", 
        DB_Escape(PI[playerid][PlayerName]));
   	Result = db_query(Database, Query);
   	if(db_num_rows(Result))
   	{
   		db_get_field_assoc(Result, "userid", Query, 7);
   		PI[playerid][Userid] = strval(Query);

                //DELITED SOME PART OF CODE 

		SetSpawnInfo(playerid, 0, PI[playerid][Skin], 529.1349,-1810.7544,-30.4171,0.000, 0, 0, 0, 0, 0, 0);
		SpawnPlayer(playerid);
	}
	else
	{
		Kick(playerid);
	}
	db_free_result(Result);
	return 1;
}
Sorry for my bad English
Reply
#2

Print the "Result"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)