- Home /
Using a Less than and More than
Hi guys I am having some problems using a less than and more than in one statement
if (Time <= 100f && >= 0f)
{
gold = true;
}
if(Time < 200f && >= 100f)
{
silver = true;
}
if(Time >= 200f)
{
bronze = true;
}
I am getting these errors Assets/Scripts/Timer.cs(42,38): error CS1525: Unexpected symbol >=' Assets/Scripts/Timer.cs(47,18): error CS1519: Unexpected symbol
if' in class, struct, or interface member declaration Assets/Scripts/Timer.cs(47,26): error CS1519: Unexpected symbol <' in class, struct, or interface member declaration Assets/Scripts/Timer.cs(49,32): error CS1519: Unexpected symbol
=' in class, struct, or interface member declaration
Answer by tanoshimi · Nov 17, 2016 at 10:39 PM
You need to make the conditions on each side of the && operator fully-formed. e.g.
if (Time <= 100f && Time >= 0f)
Answer by andreiciciu · Mar 26, 2020 at 12:00 PM
cvbh
SDFGHJKL;JHGFDSGHJKL;';KJHGFDSAASDFTYUIOP[] ';POIUYTGFDSAasdfghjkl;lkjhgfdsaASDFGHJKLJHSAASDFGHJKL;KJHGFDSAasdfghjkljhgfd
Your answer
Follow this Question
Related Questions
Quill18's Tutorial Scripts: Unexpected Symbols 1 Answer
Error unexpected symbol 'internal' What is wrong with this? 0 Answers
CS1525: 60,68 Unexpected symbol MatchMaxPlayers 1 Answer
Unexpected symbol, "Projectile" while attempting to delete gameObject.Projectile 1 Answer
error CS1525: Unexpected symbol `}' 1 Answer