[Ayuda] INI... -
OTACON - 18.10.2012
Buenas a Todos, no me crea el archivo del usuario con el sistema de datos de ****** y no se por ke :S..
Ejemplo de como coloke :
pawn Код:
//En OnPlayerRequestClass
if(!fexist(Ubicacion(playerid))
{
// aca el dialog del registro
}
else
{
// aca el dialog del ingreso
}
//En OnDialogResponse
//[*] En las funciones del menu de registro INI_ParseFile(Ubicacion(playerid),"Actualizar_%s",.bExtra = true, .extra = playerid);
//[*] En las funciones del menu de ingreso INI_Load(Ubicacion(playerid)); y INI_ParseFile(Ubicacion(playerid),"Actualizar_%s",.bExtra = true, .extra = playerid);
stock Actualizar_data(playerid,name[],value[])
{
// Los INI_Int demas...
return 1;
}
stock GuardarDatos(playerid)
{
new INI:Archivo = INI_Open(Ubicacion(playerid));
INI_SetTag(Archivo,"data");
// los INI_WriteInt y demas...
INI_Close(Archivo);
return 1;
}
stock Ubicacion(playerid)
{
new Archivo[30];
format(Archivo,sizeof(Archivo),"Usuarios/%s.ini",NombreEx(playerid));
return Archivo;
}
Si mep ueden ayudar se lo agradezco.
Desde yam uchas Gracias.
Respuesta: [Ayuda] INI... -
JuliPera - 18.10.2012
Creaste la carpeta Usuarios adentro de scriptfiles?
Respuesta: [Ayuda] INI... -
OTACON - 18.10.2012
Quote:
Originally Posted by JuliPera
Creaste la carpeta Usuarios adentro de scriptfiles?
|
si , esta creada :S
Respuesta: [Ayuda] INI... -
OTACON - 19.10.2012
Nadie Sabe Usar INI ? :S
Re: [Ayuda] INI... -
digman - 19.10.2012
Correcciуn es Y_INI, tienes que crear: INI_ParseFile(Ubicacion(playerid),"Actualizar_%s", .bExtra = true, .extra = playerid);
aca:
Код:
//En OnPlayerRequestClass
if(!fexist(Ubicacion(playerid))
{
// aca el dialog del registro
}
else
{
AQUI
// aca el dialog del ingreso
}
y pasame el Codigo de NombreEx quiero ver algo
EDITO: Lo tienes q colocar tambien donde dije, vi q lo colocaste en la funcion del dialog y por eso va dos veces esas funcion
....
ME OLVIDE DE OTRA COSA:
Код:
//En OnDialogResponse
//[*] En las funciones del menu de registro NINGUNA SOLO LA DE GUARDAR GuardarDatos(playerid);
//[*] En las funciones del menu de ingreso SOLO INI_ParseFile(Ubicacion(playerid),"Actualizar_%s",.bExtra = true, .extra = playerid);
AVIASAME SI TE FUNCIONA
Y SI NO PUEDES SOLUCIONARLO YA VENITE PARA ESTE TUTO:
https://sampforum.blast.hk/showthread.php?tid=352703
Respuesta: [Ayuda] INI... -
OTACON - 22.10.2012
Revivo:
Si, ya habia intentado l o ke dijo digman , y he seguido tutoriales, pero analizando y probando he descubierto algo, el problema esta en INI_ParseFile no carga los datos :S,
creo ke algo esta mal definido alli :S pero no se ke :S
Respuesta: [Ayuda] INI... -
TheChaoz - 22.10.2012
Quote:
Originally Posted by bytytus
Revivo:
Si, ya habia intentado l o ke dijo digman , y he seguido tutoriales, pero analizando y probando he descubierto algo, el problema esta en INI_ParseFile no carga los datos :S,
creo ke algo esta mal definido alli :S pero no se ke :S
|
INI_ParseFile no tiene ningun bug conosido y ha sido testeado por muchos scripters, serias el primero en encontrar un bug en dicha funcion y creo que el error es tuyo, pero puedo equivocarme.
Si el archivo no fuera creado, en tu log deberias tener una linea como esta: "INI_Open could not find or create file {tu_archivo}".
Es muy posible que estes eliminando el archivo.
Respuesta: [Ayuda] INI... -
OTACON - 22.10.2012
Quote:
Originally Posted by the_chaoz
INI_ParseFile no tiene ningun bug conosido y ha sido testeado por muchos scripters, serias el primero en encontrar un bug en dicha funcion y creo que el error es tuyo, pero puedo equivocarme.
Si el archivo no fuera creado, en tu log deberias tener una linea como esta: "INI_Open could not find or create file {tu_archivo}".
Es muy posible que estes eliminando el archivo.
|
no dije ke INI_ParseFile tenia un bug, dije ke algo esta mal definido o colocado en mi codigo, y n, no me tira ese error, tampoco creo, ke este eliminando el archivo, solo ke INI_Close haga es.
y segun ****** dijo ke INI_ParseFile es lo ke le sigue a INI_Load y podeso he intentado tambien colocandolo antes de INI_ParseFile. :S
INI_Load - Loads an INI file using standard features.
INI_ParseFile - Loads a file as an ini and distributes data.
INI_GetEntryName - Gets the name of an INI item.
INI_GetEntryText - Gets the value of an INI item.
INI_Open - Opens an INI for writing.
INI_Close - Closes an INI being written to.
INI_SetTag - Sets a subheading in an INI fo subsequent writes.
INI_WriteString - Writes a string to an INI.
INI_WriteInt - Writes an int to an INI.
INI_WriteFloat - Writes a float to an INI.
INI_WriteHex - Writes a hex to an INI.
INI_WriteBin - Writes a binary to an INI.
INI_WriteBool - Writes a boolean to an INI.
INI_RemoveEntry - Remove an entry from a file.
Static:
INI_WriteBuffer - Writes an INI's buffer to the file.
INI_AddToBuffer - Adds a string to an INI buffer.
Inline:
INI_Int - Parse an integer INI entry.
INI_Float - Parse a float INI entry.
INI_Hex - Parse a hex INI entry.
INI_Bin - Parse a binary INI entry.
INI_Bool - Parse a binary INI entry.
INI_String - Parse a string INI entry.
cual Elimina el Archivo ? INI_RemoveEntry creo ke elimina una linea. pero tampoco lo estoy usando . :S
Respuesta: [Ayuda] INI... -
TheChaoz - 23.10.2012
Ninguna de dichas funciones elimina un archivo, dije algo que podrias estar haciendo y lo que ****** dijo es asi porque si abres el include, te daras cuenta que INI_Load es una version simplificada/limitada de INI_ParseFile.
Si tu no eliminas el archivo, y el codigo no esta mal, solo queda una opcion, la cual es que "GuardarDatos" no este siendo llamada. Chequea esto y avisanos que paso.