warning 213: tag mismatch
#1

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;
}
Reply
#2

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.
Reply
#3

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); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)