I am trying to emulate a dice rolling and if the die lands on a certain number then it does something, and if it lands on another number it does something else. However, I am having trouble with this. Where it says if (hitPoints = 1) I am getting the error:
Cannot implicitly convert type 'int' to 'string.'
But you can clearly see that it is indeed a string. Any help on this problem would be very much appreciated, thank you in advance.
Random r = new Random();
int hit = r.Next(1, 5);
string hitPoints = hit.ToString();
EmbedBuilder builder = new EmbedBuilder();
if (hitPoints = 1)
{
builder.WithTitle("");
}