warning 213: tag mismatch
error 032: array index out of bounds (variable "PlayerInfo")
if(dialogid == DR)
{
if(!response)
{
SendClientMessage(playerid, -1, "OPERACIУN CANCELADA.");
} else
{
if(strcmp(inputtext, PlayerInfo[playerid][tPassword], true) == 0)
{
ShowPlayerDialog(playerid, DELEGIR, DIALOG_STYLE_LIST, "Tarjeta\n\nElige tu operaciуn", "- Retirar\nBalance\nDepositar", "Aceptar", "Cancelar");
}
else
{
SendClientMessage(playerid, -1, "CONTRASEСA: INCORRECTA.");
}
}
}
//--------Acб siguen los dialogs
if (strcmp("/dtarjeta", cmdtext, true, 10) == 0)
{
new tmp1[128], string[128], tmp2[128], idx,ejugador, cmd[128], cantidad;
cmd = strtok(cmdtext, idx);
tmp1 = strtok(cmdtext, idx);
cantidad = strval(tmp2);
ejugador = strval(tmp1);
if(TarjetaInfo[playerid][pTarjeta] == false)
{
if(strlen(tmp1))
{
if(strlen(tmp2))
{
if(GetPlayerMoney(ejugador) >= cantidad)
{
TarjetaInfo[playerid][pTarjeta] = true;
TarjetaInfo[playerid][tMonto] = cantidad;
format(string, sizeof(string), "%s te dio una tarjeta con un valor de %d", PlayerName(playerid), cantidad);
SendClientMessage(ejugador, -1, string);
format(string, sizeof(string), "Diste a %s una tarjeta con valor de %d", PlayerName(ejugador), cantidad);
SendClientMessage(playerid, -1, string);
GivePlayerMoney(ejugador, -cantidad);
//ShowPlayerDialog(playerid, DTARJETA, DIALOG_STYLE_INPUT, "Tarjeta", " - - - - * Seguridad - - - - - \nTarjeta: Ingresa la contraseсa de tu tarjeta.", "Aceptar", "Cancelar");
new rand;
rand = random(10000);
TarjetaInfo[playerid][tPassword] = rand;
format(string, sizeof(string), "El nъmero PIN de tu tarjeta es %d", TarjetaInfo[playerid][tPassword]);
SendClientMessage(ejugador, -1, string);
//TarjetaInfo[playerid][tPassword] = password;
} else SendClientMessage(playerid, -1, "El jugador no tiene suficente dinero para pagar la tarjeta");
} else SendClientMessage(playerid, -1, "Uso: /dtarjeta <id> <monto>");
} else SendClientMessage(playerid, -1, "Uso: /dtarjeta <id> <monto>");
} else SendClientMessage(playerid, -1, "Ese jugador ya tiene una tarjeta!");
return 1;
}
enum tInfo
{
tValor,
tMonto,
tResto,
tPassword[128],
tTotal,
tCompra,
bool:pTarjeta
};
new TarjetaInfo[MAX_PLAYERS][tInfo];
if(strcmp(inputtext, PlayerInfo[playerid][tPassword], true) == 0)
me parece que para comparar variables de texto debes usar strind, strinf (o como se escriba ahora no estoy en mi pc para ponerte un ejemplo si gustas esperar o puedes ver temas sobre eso
|
Es PlayerInfo[playerid][tPassword] o TarjetaInfo[playerid][tPassword]
![]() |