29.09.2011, 21:28
(
Последний раз редактировалось [00]Luis; 30.09.2011 в 18:53.
)
Hola, Necesito ayuda con este comando:
Me tira estos errores:
Les agradecerнa cualquier ayuda...
Saludos
pawn Код:
dcmd_login(playerid, params[])
{
new File[100], Nombre[MAX_PLAYER_NAME], string[128];
new Contrasena[100];
new ContrasenaIngresada[100];
GetPlayerName(playerid, Nombre, sizeof(Nombre));
format(File, sizeof(File), PlayerFile, Nombre);
if(sscanf(params, "s", ContrasenaIngresada)) SendClientMessage(playerid, COLOR_ROJO, "Usa: /login [Contraseсa]");
else if(!dini_Exists(File)) SendClientMessage(playerid, COLOR_ROJO, "Error: Cuenta sin registrar");
else if(IsLogged[playerid]) SendClientMessage(playerid, COLOR_ROJO, "Error: Ya has iniciado sesion");
Contrasena = dini_Int(File, "hashPW");
else if(udb_hash(Contrasena) != ContrasenaIngresada) SendClientMessage(playerid, COLOR_ROJO, "Error: Contraseсa Incorrecta!");
else
{
IsLogged[playerid] = 1;
pInfo[playerid][Nivel] = dini_Int(File, "Nivel");
SetPlayerScore(playerid, pInfo[playerid][Score]);
GivePlayerMoney(playerid, dini_Int(File, "Dinero")-GetPlayerMoney(playerid));
format(string, sizeof(string), "|- %s Has iniciado sesion correctamente -|", Nombre);
SendClientMessage(playerid, COLOR_VERDE, string);
}
return 1;
}
Код:
C:\Users\Gladis\Desktop\Pawn\filterscripts\Pruebas.pwn(150) : error 033: array must be indexed (variable "Contrasena") C:\Users\Gladis\Desktop\Pawn\filterscripts\Pruebas.pwn(151) : error 029: invalid expression, assumed zero C:\Users\Gladis\Desktop\Pawn\filterscripts\Pruebas.pwn(151) : warning 215: expression has no effect C:\Users\Gladis\Desktop\Pawn\filterscripts\Pruebas.pwn(151) : error 001: expected token: ";", but found "if" C:\Users\Gladis\Desktop\Pawn\filterscripts\Pruebas.pwn(151) : error 033: array must be indexed (variable "ContrasenaIngresada") C:\Users\Gladis\Desktop\Pawn\filterscripts\Pruebas.pwn(151) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
Saludos