Error con dini. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Error con dini. (
/showthread.php?tid=417615)
Error con dini. -
jwalker - 21.02.2013
2. Valores de Dini se duplican.
Cree este comando:
PHP код:
CMD:certificar(playerid, params[]){
if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GRAD2, "ЎNo autorizado!");
if(!sscanf(params, "s[32]", params[0])){
if(strfind(params[0], "_" , true) != -1){
new string3[64], string[128];
format(string3,sizeof(string3),"Usuarios/%s.lvrp",params[0]);
if(dini_Exists(string3)){
new INI:ini = INI_Open(string3);
INI_WriteInt(ini, "Certificado", 1);
INI_Close(ini);
format(string, sizeof(string), "AdmLVRP: %s certificу la cuenta a nombre: %s",RPN(playerid), params[0]);
SendAdminMessage(COLOR_YELLOW, 1, string);
} else SendClientMessage(playerid, COLOR_GRAD2, "No se encontrу una cuenta con ese nombre");
} else SendClientMessage(playerid, COLOR_GRAD2, "Usб: /certificar <Nombre_Jugador>");
} else SendClientMessage(playerid, COLOR_GRAD2, "Usб: /certificar <Nombre_Jugador>");
return 1;
}
Pero resulta que en usuarios.ini sale asн:
Код:
Certificado = 1
[data]
Password = 67109274
Dinero = 5000
Admin = 5
Kills = 0
Job = 0
Negocio = 0
Faccion = 0
Lider = 0
Edad = 0
LlegandoAlServidor = 0
Carnet = 0
Muertes = 0
Certificado = 0
El dato que en realidad sirve es el ъltimo (Certificado = 0) pero el comando me crea uno nuevo, que no sirve. їCуmo hago para que no cree un dato nuevo y que SН edite el que vale?
Respuesta: Error con dini. -
NeuZz - 22.02.2013
es y_ini, no dini y tienes una mescla con dini

mejor pasalo todo a dini o a y_ini y de ahi vemos