Jump to content
  • 0

Intrebare InputText


Andry1995

Question

Salutare, cum as putea corecta 3 warning-uri?

#include <a_samp>
#include <ZCMD>

stock AddLogLine( field[ ], file[ ], input[ ] )
{
    new string[128];
    format(string, 128, "%s: %srn", field, input);

    new File:fhandle;

    if(fexist(file)) {
        printf("Creare Fisier '%s' deoarece nu exista niciun fisier cu aces cuvant.", file);
    }

    fhandle = fopen(file,io_append);

    fwrite(fhandle,string);
    fclose(fhandle);
    return 1;
}

stock WriteLog(file[], input[])
{
	File:filevar;
	if(!fexist(file)) filevar = fopen(file, io_write);
	else filevar = fopen(file, io_append);
	if(!fexist(file))
	{
		printf("Failed to load '%s'", file);
		return 0;
	}
	else
	{
		new str[512];
		format(str, sizeof(str), "%srn", input);
		fwrite(filevar, input);
		fclose(filevar);
		return 1;
	}
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 181 && response == 1)
	{
		new string[256];
		if(!fexist("RadioRequests.txt"))
		{
			new File:create = fopen("RadioRequests.txt", io_write);
			fclose(create);
		}
		format(string, sizeof(string), "%srn", inputtext);
		new Fike:pos=fopen("RadioRequests.txt", io_append);
		fwrite(pos, string);
		fclose(pos);
	}
	return 1;
}

COMMAND:myemail(playerid, params[])
{
	ShowPlayerDialog(playerid, 181, DIALOG_STYLE_INPUT, "DataBase Registering", "{CACA11}Care este mail-ul tau?n{108XII}Vom avea nevoie de mail-ul tau", "Ok", "");
	return 1;
}

Imi zice ca:
warning 213: tag mismatch la liniile 53, 54, 55; Adica alea de la dialog response "new Fike:...../fwrite(pos, string);/fclose(pos);

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.