C
C#16mo ago
MRW419

❔ 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
Kouhai
Kouhai16mo ago
else (numOne == numTwo) Should be else if (numOne == numTwo) Also, does unity have a "print" method? I don't think so
Iron
Iron16mo ago
No 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 above
Pobiega
Pobiega16mo ago
Debug.Log
Iron
Iron16mo ago
Ahh yeah
Accord
Accord16mo ago
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.

Did you find this page helpful?