if(year == 2014)
HappyNewYear = true
Unknown identifier: ‘year’.
Unknown identifier: ‘HappyNewYear’.
Happy new year!
var currentYear : int = 2013;
var targetYear : int = 2014;
private var secondsTillNewYear : int = 0;
private var newYear : boolean = false;
function Start () {
secondsTillNewYear = (targetYear * 365 * 24 * 3600) - (currentYear * 365 * 24 * 3600) ;
}
function Update () {
if (Time.time > secondsTillNewYear) {
newYear = true;
Debug.Log("Happy New Year");
}
}
^ Had to be started at exact 00:00:00 (January 1) 2013
Lol Peter Ples, i think its supposed to be…
var year = 2013;
var month = 1;
var HappyNewYear = false;
function Update () {
month += 1;
if(month == 12){
year += 1;
}
if(year == 2014){
HappyNewYear = true;
GoCrazyDAW();
}
}
function GoCrazyDAW () {
if(HappyNewYear == true){
Debug.Log("GO CRAZY PEEPS ITS NEW YEARS EVE YEEEEE HAWWWWWWWW");
}
}
and BTW your missing 1 more thing @Kovenant
“Error line 2: Insert semicolon at the end.”
anyways HAPPY NEW YEAR
P.S really nice topic name, a way to attract developers who want to see what you’ve done… lol
You made my day.
^ Made my day ^