Cuando compilo mi proyecto de C# en MonoDevelop, me sale el siguiente error:Tipo de expresión condicional no se puede determinar como
Type of conditional expression cannot be determined as 'byte' and 'int' convert implicitly to each other
Fragmento de código:
byte oldType = type;
type = bindings[type];
//Ignores updating blocks that are the same and send block only to the player
if (b == (byte)((painting || action == 1) ? type : 0))
{
if (painting || oldType != type) { SendBlockchange(x, y, z, b); } return;
}
Esta es la línea que se destaca en el error:
if (b == (byte)((painting || action == 1) ? type : 0))
¡La ayuda es muy apreciada!
que tenga sentido. ¡Muchas gracias! – Jakir00
¿Qué tal si el parámetro se espera que sea de cualquier tipo, como 'String.Format (" value: {0} ", (value == null)?:" Null ": value)' donde el valor es de tipo 'int?'? – mr5