[ERROR] Cargado de usuarios.
#1

Buenas, hago este post para ver si me pueden ayudar con un problemilla que tengo.


///////// ERROR

Al loguearme en mi servidor me carga todos los datos bien, posiciуn y todo pero no hace el spawn en esa posiciуn y ahora me registro y si me carga bien, osea tiene que ser problema del dialogo o algo, os dejo el dialogo, mysql_log, funcion CargarCuenta();, y la funcion IsValid(); para ver si me podйis ayudar.



Dialogo:

Код:
	if(dialogid == LOGIN)
	{
		 if(!response){
	            SendClientMessage(playerid, -1, "Usted ha sido expulsado automбticamente del servidor. Razуn: Rechazar el login.");
	            Kick(playerid);
	            return 1;
         }
  		if(IsValid(playerid, "Password", inputtext) && (strlen(inputtext) > 0))
		{
			CargarCuenta(playerid);
			PlayerInfo[playerid][pID] = Datos(playerid, "id");
			PlayerInfo[playerid][pJugando] = 1;
			SetPlayerVirtualWorld(playerid, 0);
			TogglePlayerSpectating(playerid, 0);
			LoadUserVehicles(playerid);
			return 1;
		}
		else
		{
		ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, ">>  Contraseсa incorrecta!", "\n  Esa no es la contraseсa!\n\n  Escribe la contraseсa correcta, porfavor:\n", "Log-in", "Cancelar");
		return 1;
		}
	}
CargarCuenta();

Код:
forward CargarCuenta(playerid);
public CargarCuenta(playerid)
{
	new tmp[900];
	new row[128];
	format(tmp, 128, "SELECT X, Y, Z, Angulo, Vida, Armor, Interior, VirtualWorld FROM players WHERE id = %d LIMIT 1", PlayerInfo[playerid][pID]);
	mysql_query(tmp);
	mysql_store_result();
	mysql_fetch_row(row);
	split(row, arrCoords, '|');
	PlayerInfo[playerid][pPos_x] = floatstr(arrCoords[0]);
	PlayerInfo[playerid][pPos_y] = floatstr(arrCoords[1]);
	PlayerInfo[playerid][pPos_z] = floatstr(arrCoords[2]);
	PlayerInfo[playerid][pAngulo] = floatstr(arrCoords[3]);
	SetPlayerHealth(playerid, strval(arrCoords[4]));
	SetPlayerArmour(playerid, floatstr(arrCoords[5]));
	SetPlayerInterior(playerid, strval(arrCoords[6]));
	SetPlayerVirtualWorld(playerid, strval(arrCoords[7]));
	mysql_free_result();
	if(Datos(playerid, "Bloqueado") == 1)
	{
	SendClientMessage(playerid, Rojo, "Tu cuenta se encuentra baneada.");
	Ban(playerid);
	return 0;
	}
    PlayerInfo[playerid][pSexo] = Datos(playerid, "Sexo");
    PlayerInfo[playerid][pEdad] = Datos(playerid, "Edad");
    PlayerInfo[playerid][pHerido] = Datos(playerid, "Herido");
    PlayerInfo[playerid][pUniforme] = Datos(playerid, "Uniforme");
    PlayerInfo[playerid][pDuty] = Datos(playerid, "EnServicio");
    GivePlayerMoney(playerid, Datos(playerid, "Dinero"));
	PlayerInfo[playerid][pDinero] = GetPlayerMoney(playerid);
    PlayerInfo[playerid][pBanco] = Datos(playerid, "Banco");
    PlayerInfo[playerid][pSkin] = Datos(playerid, "Skin");
    PlayerInfo[playerid][pAdmin] = Datos(playerid, "AdminLevel");
    PlayerInfo[playerid][pNivel] = Datos(playerid, "Nivel");
    PlayerInfo[playerid][pPay] = Datos(playerid, "PayDay");
    PlayerInfo[playerid][pRespeto] = Datos(playerid, "Respeto");
    SetPlayerScore(playerid, PlayerInfo[playerid][pNivel]);
    switch(PlayerInfo[playerid][pDuty])
    {
    case 0:
    {
    SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], PlayerInfo[playerid][pAngulo], 0,0,0,0,0,0);
    }
    case 1:
	{
	SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pUniforme], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], PlayerInfo[playerid][pAngulo], 0,0,0,0,0,0);
	}
	}
	switch(PlayerInfo[playerid][pSexo])
	{
 	case 0:{
    SendClientMessage(playerid, -1, "Tus datos estбn daсados, avisa a un administrador.");
    }
	case 1:{
	format(string, sizeof(string), "{FFFFFF}Bienvenido {FFFF33}%s{FFFFFF}.", pName(playerid));
	SendClientMessage(playerid, Amarillo, string);
	}
	case 2:{
	format(string, sizeof(string), "{FFFFFF}Bienvenida {FFFF33}%s{FFFFFF}.", pName(playerid));
	SendClientMessage(playerid, Amarillo, string);
	}
	}
	SpawnPlayer(playerid);
	return 1;
}
IsValid();

Код:
forward IsValid(playerid, campo[], cadena[]);
public IsValid(playerid, campo[], cadena[])
{
	new tmp[100];
	new row[60];
	format(tmp, 100, "SELECT %s FROM players WHERE Nombre = '%s' LIMIT 1", campo, pName(playerid));
	mysql_query(tmp);
	mysql_store_result();
	mysql_fetch_row(row);

	if(strcmp(row, cadena, true) == 0)
	{
		return 1;
	}
	mysql_free_result();
	return 0;
}
Mysql_Log

Код:
[05:55:03]  

[05:55:03] ---------------------------

[05:55:03] MySQL Debugging activated (08/27/13)

[05:55:03] ---------------------------

[05:55:03]  

[05:55:03] >> mysql_ping( Connection handle: 1 )

[05:55:03] CMySQLHandler::Ping() - Connection is still alive.

[05:55:03]  

[05:55:03] ---------------------------

[05:55:03] MySQL Debugging activated (08/27/13)

[05:55:03] ---------------------------

[05:55:03]  

[05:55:03] >> mysql_query( Connection handle: 1 )

[05:55:03] CMySQLHandler::Query(SELECT COUNT(*) FROM casas) - Successfully executed.

[05:55:03] >> mysql_store_result( Connection handle: 1 )

[05:55:03] CMySQLHandler::StoreResult() - Result was stored.

[05:55:03] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:03] CMySQLHandler::FetchRow() - Return: 0

[05:55:03] >> mysql_query( Connection handle: 1 )

[05:55:03] CMySQLHandler::Query(SELECT * FROM casas ) - Successfully executed.

[05:55:03] >> mysql_store_result( Connection handle: 1 )

[05:55:03] CMySQLHandler::StoreResult() - Result was stored.

[05:55:03] >> mysql_free_result( Connection handle: 1 )

[05:55:03] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:03] >> mysql_query( Connection handle: 1 )

[05:55:03] CMySQLHandler::Query(SELECT COUNT(*) FROM vehsDealer) - Successfully executed.

[05:55:03] >> mysql_store_result( Connection handle: 1 )

[05:55:03] CMySQLHandler::StoreResult() - Result was stored.

[05:55:03] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:03] CMySQLHandler::FetchRow() - Return: 0

[05:55:03] >> mysql_query( Connection handle: 1 )

[05:55:03] CMySQLHandler::Query(SELECT * FROM vehsDealer) - Successfully executed.

[05:55:03] >> mysql_store_result( Connection handle: 1 )

[05:55:03] CMySQLHandler::StoreResult() - Result was stored.

[05:55:03] >> mysql_free_result( Connection handle: 1 )

[05:55:03] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:23] >> mysql_real_escape_string( Connection handle: 1 )

[05:55:23] CMySQLHandler::EscapeString(Zarco); - Escaped 5 characters to Zarco.

[05:55:23] >> mysql_query( Connection handle: 1 )

[05:55:23] CMySQLHandler::Query(SELECT id FROM players WHERE LOWER(Nombre) = LOWER('Zarco') LIMIT 1) - Successfully executed.

[05:55:23] >> mysql_store_result( Connection handle: 1 )

[05:55:23] CMySQLHandler::StoreResult() - Result was stored.

[05:55:23] >> mysql_num_rows( Connection handle: 1 )

[05:55:23] CMySQLHandler::NumRows() - Returned 1 row(s)

[05:55:23] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:23] CMySQLHandler::FetchRow() - Return: 4

[05:55:23] >> mysql_free_result( Connection handle: 1 )

[05:55:23] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT Password FROM players WHERE Nombre = 'Zarco' LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: Zarco

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT X, Y, Z, Angulo, Vida, Armor, Interior, VirtualWorld FROM players WHERE id = 0 LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT Bloqueado FROM players WHERE Nombre = 'Zarco' LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: 0

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT Sexo FROM players WHERE Nombre = 'Zarco' LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: 1

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT Edad FROM players WHERE Nombre = 'Zarco' LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: 16

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT Herido FROM players WHERE Nombre = 'Zarco' LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: 0

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT Uniforme FROM players WHERE Nombre = 'Zarco' LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: 1

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT EnServicio FROM players WHERE Nombre = 'Zarco' LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: 0

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT Dinero FROM players WHERE Nombre = 'Zarco' LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: 0

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT Banco FROM players WHERE Nombre = 'Zarco' LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: 0

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT Skin FROM players WHERE Nombre = 'Zarco' LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: 0

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT AdminLevel FROM players WHERE Nombre = 'Zarco' LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: 0

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT Nivel FROM players WHERE Nombre = 'Zarco' LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: 1

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT PayDay FROM players WHERE Nombre = 'Zarco' LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: 0

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT Respeto FROM players WHERE Nombre = 'Zarco' LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: 0

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT id FROM players WHERE Nombre = 'Zarco' LIMIT 1) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: 4

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT COUNT(*) FROM `playerCars` WHERE `Dueno` = 4) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_fetch_row_format( Connection handle: 1 )

[05:55:24] CMySQLHandler::FetchRow() - Return: 0

[05:55:24] >> mysql_query( Connection handle: 1 )

[05:55:24] CMySQLHandler::Query(SELECT * FROM `playerCars` WHERE `Dueno` = 4) - Successfully executed.

[05:55:24] >> mysql_store_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::StoreResult() - Result was stored.

[05:55:24] >> mysql_free_result( Connection handle: 1 )

[05:55:24] CMySQLHandler::FreeResult() - Result was successfully free'd.
Os agradecerнa mucho la ayuda.
Reply
#2

Nadie que me pueda ayudar?....gracias.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)