SA-MP Forums Archive
warning 213: tag mismatch - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: warning 213: tag mismatch (/showthread.php?tid=645431)



warning 213: tag mismatch - MariusAdv - 26.11.2017

Hello, I have a problem with this part. On line 98 warning 213: mismatch tag, same as line 102 and line 120 all the same. If you can help me.

Код:
forward OnPlayerLogin(playerid);
public OnPlayerLogin(playerid)
{
	new rows, fields;
	cache_get_data(rows, fields);
	if(rows)
	{
		ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logheaza-te!", "Te rog sa-ti introduci parola contului tau mai jos!", "Logare", "Exit");    LINE 98
	}
	else
	{
		ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Inregistrare", "Trebuie sa iti creezi un cont ca sa joci pe server. nTasteaza mai jos o parola pentru a te inregistra!", "Inregsitreaza", "Exit");     LINE 102   
	}
	return 1;
}

forward OnLogin(playerid);
public OnLogin(playerid)
{
    new rows, fields,temporar[200];
    cache_get_data(rows, fields);
    if(rows)
    {
        P_Data[playerid][pParola] = cache_get_field_content(0, "Parola",temporar);
        P_Data[playerid][pID] = cache_get_field_content_int(0, "ID");
        SpawnPlayer(playerid);
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Parola incorecta!", "Te rog sa iti introduci parola corecta, pentru a te loga pe server.", "Logare", "Exit");      LINE 120
    }
    return 1;
}



Re: warning 213: tag mismatch - Konstantinos - 26.11.2017

Are you using an enumerator for dialog IDs? I presume you passed a tag as:
pawn Код:
enum DIALOGS
{
    DIALOG_LOGIN,
    DIALOG_REGISTER
};
so yes, that'd require to use:
pawn Код:
ShowPlayerDialog(playerid, DIALOGS: DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, ...);
You can remove the name of the tag to just:
pawn Код:
enum
{
    DIALOG_LOGIN,
    DIALOG_REGISTER
};
and it will compile fine.


Re: warning 213: tag mismatch - Kane - 26.11.2017

PHP код:
P_Data[playerid][pParola] = cache_get_field_content(0"Parola",temporar); 
You're using cache_get_field_content incorrectly. That's one of the warnings.

Example usage:
PHP код:
new 
     
dest[128];
cache_get_field_content(0"name"dest);
printf("The value in the field 'name' is '%s'."dest);