7

while(isProgramming){
If(hasCoffee){
Destroy(sleep);
}
wait(Date.timeOfHr*5);

//Never stop coding
isProgramming=true;
}

Comments
  • 3
    You would get an error. A date variable is not compatible with an int. You would need to convert.

    At least in C#
  • 0
    The first letter of a method has to be lowercase
  • 2
    Also I would change the while condition to while (isProgramming && hasCoffee).

    Btw, there's no need to set isProgramming to true, since it's already true when it enters the loop. But it's just me being an anti joke chicken.
  • 0
    @davide Depends on which language and code convention.
  • 0
    @Pgdevpatryk just started with Unity honestly just made up this code
  • 0
    @davide Not if it belongs to a class (eg. Programmer)
  • 0
    @randomCoder yes, for example in C or Java is always lowercase
Add Comment