Amellia sizilia sembiring Posted October 8, 2015 Posted October 8, 2015 (edited) Hi, i tried to write my first script for auto day and night daily at 00:00 and 18:00.but many syntax error. if( gettime(3) >= 18 ){set night;} else if ( gettime(3) >= 00 ) {set day;} else {} Edited October 8, 2015 by Amellia sizilia sembiring Quote
Elsa Mist Posted October 8, 2015 Posted October 8, 2015 easy way use : OnClockXXXX: OnDayXXXX: OnHourXX: OnMinuteXX: OnSSSXXXX: Quote
Emistry Posted October 8, 2015 Posted October 8, 2015 OnClock0000: night; end; OnClock1800: day; end; OnInit: if ( gettime(3) < 18 ) { night; } else { day; } end; OnClock0000: night; end; OnClock1800: day; end; 1 Quote
Amellia sizilia sembiring Posted October 8, 2015 Author Posted October 8, 2015 (edited) Emistry, i try to use your code but nothing happens. my time is 20:45. it should be night now. but its day. and i try to check @time. i get notice the game is in permanent daylight. and i think your top code wrong expression. it should be > not < 18. Edited October 8, 2015 by Amellia sizilia sembiring Quote
Emistry Posted October 8, 2015 Posted October 8, 2015 OnInit: if ( gettime(3) <= 18 ) { day; } else { night; } end; OnClock0000: day; end; OnClock1800: end; Quote
Amellia sizilia sembiring Posted October 8, 2015 Author Posted October 8, 2015 i get error in mapserv with parse line in line 1 stoping oninit Quote
Elsa Mist Posted October 8, 2015 Posted October 8, 2015 U dont put the script header.... -<tab>script<tab>nightday bla bla bla Lazy to write full scripts im on my phone. Wait for emistry reply or others. Quote
Question
Amellia sizilia sembiring
Hi, i tried to write my first script for auto day and night daily at 00:00 and 18:00.but many syntax error.
Edited by Amellia sizilia sembiring7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.