warning 213: tag mismatch
#9

Mencionarй tu error:

pawn Код:
public GetPlayerScoreEx(playerid)
{
    new Float:score; // Declararemos que 'score' serб flotante.
    score = PlayersData[playerid][Puntos] / 10;
    floatround(score, floatround_round); // Aquн haremos que 'score' sea un entero.
    return score; // Retornamos 'score', peeeero, como la funciуn no tiene el tag 'Float', pero la variable sн, darб errores.
}

Al usar 'floatround' no declararбs que el compilador tomarб esa variable como flotante, por lo que darб error.

Soluciуn:


pawn Код:
stock GetPlayerScoreEx(playerid) // Ya sea 'public' o 'stock', siempre serб el mismo cуdigo. No cambia errores.
{
    return floatround(PlayersData[playerid][Puntos]/10);
}
O mбs simple:

pawn Код:
#define GetPlayerScoreEx(%1) floatround(PlayersData[%1][Puntos]/10)

Es solo simple lуgica.
Reply


Messages In This Thread
warning 213: tag mismatch - by unuky - 28.06.2014, 17:46
Respuesta: warning 213: tag mismatch - by Zume - 28.06.2014, 17:55
Respuesta: warning 213: tag mismatch - by unuky - 28.06.2014, 18:05
Respuesta: warning 213: tag mismatch - by deryan - 28.06.2014, 18:13
Respuesta: warning 213: tag mismatch - by Zume - 28.06.2014, 18:15
Respuesta: warning 213: tag mismatch - by unuky - 28.06.2014, 18:37
Respuesta: warning 213: tag mismatch - by Zume - 28.06.2014, 18:50
Respuesta: warning 213: tag mismatch - by unuky - 28.06.2014, 19:38
Respuesta: warning 213: tag mismatch - by Swedky - 28.06.2014, 21:32
Respuesta: warning 213: tag mismatch - by OTACON - 28.06.2014, 21:47

Forum Jump:


Users browsing this thread: 1 Guest(s)