SA-MP Forums Archive
ayuda con un error - 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: ayuda con un error (/showthread.php?tid=530765)



ayuda con un error - capottematias - 08.08.2014

hola gente de samp forum xddd

tengo un problema con este codigo


public GuardarInfo(playerid)
{
if(IsPlayerConnected(playerid))
{
if(JugadorLogeado[playerid] == 1)
{
new str [250];
format(str, 128, "/eXtremeROL/conocidos/%s.ini", PlayerNameNormal(playerid));
new File:femail = fopen(str, io_append);
new str2[64];
format(str2, 64, "\r\nNombre: %s", PlayerNameNormal(playerid));
fwrite(femail, str2);
fclose(femail);

format(str, 128, "/eXtremeROL/conocidos/%s.ini", PlayerNameNormal(playerid));
new File:femail2 = fopen(str, io_append);
format(str2, 64, "\r\nDinero: %d", PlayerInfo[playerid][dinero]);
fwrite(femail2, str2);
fclose(femail2);
return 1;
}
}

esta es la liсa del error
if(JugadorLogeado[playerid] == 1)

el error que me tira
error 030: compound statement not closed at the end of file (started at line 22211)

ayudaaaaaaaaaaaaaaaaaaaaaaaaaaa


Respuesta: ayuda con un error - Maflow - 08.08.2014

Te faltaba un corchete si no me equivoco, intenta con el siguiente cуdigo.

pawn Код:
public GuardarInfo(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(JugadorLogeado[playerid] == 1)
        {
            new str[250];
            format(str, 128, "/eXtremeROL/conocidos/%s.ini", PlayerNameNormal(playerid));
            new File:femail = fopen(str, io_append);
            new str2[64];
            format(str2, 64, "\r\nNombre: %s", PlayerNameNormal(playerid));
            fwrite(femail, str2);
            fclose(femail);

            format(str, 128, "/eXtremeROL/conocidos/%s.ini", PlayerNameNormal(playerid));
            new File:femail2 = fopen(str, io_append);
            format(str2, 64, "\r\nDinero: %d", PlayerInfo[playerid][dinero]);
            fwrite(femail2, str2);
            fclose(femail2);
            return 1;
        }
    }
}



Re: ayuda con un error - capottematias - 08.08.2014

u me funcino gracias +rep