❔ I'm having trouble with my assigment and I need help understanding
I'm learning Unity in my game design class and in Unity it tells me i'm missing one semi-colon but where?
if (numOne > numTwo)
{
print("numOne is greater then numTwo");
}
else (numOne == numTwo)
{
print("numOne is equal to numTwo");
}
5 Replies
else (numOne == numTwo)
Should be
else if (numOne == numTwo)
Also, does unity have a "print" method?
I don't think soNo but you can do debug("your text") and watch it appear in the debug console i think. Replace
print
with debug
and also use else if
as mentioned aboveDebug.Log
Ahh yeah
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.