Amellia sizilia sembiring Posted October 8, 2015 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 108 Reputation: 4 Joined: 01/04/12 Last Seen: August 30, 2016 Share 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 Link to comment Share on other sites More sharing options...
Elsa Mist Posted October 8, 2015 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 387 Reputation: 60 Joined: 10/08/13 Last Seen: July 14, 2022 Share Posted October 8, 2015 easy way use : OnClockXXXX: OnDayXXXX: OnHourXX: OnMinuteXX: OnSSSXXXX: Quote Link to comment Share on other sites More sharing options...
Emistry Posted October 8, 2015 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 14 hours ago Share 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 Link to comment Share on other sites More sharing options...
Amellia sizilia sembiring Posted October 8, 2015 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 108 Reputation: 4 Joined: 01/04/12 Last Seen: August 30, 2016 Author Share 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 Link to comment Share on other sites More sharing options...
Emistry Posted October 8, 2015 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 14 hours ago Share Posted October 8, 2015 OnInit: if ( gettime(3) <= 18 ) { day; } else { night; } end; OnClock0000: day; end; OnClock1800: end; Quote Link to comment Share on other sites More sharing options...
Amellia sizilia sembiring Posted October 8, 2015 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 108 Reputation: 4 Joined: 01/04/12 Last Seen: August 30, 2016 Author Share Posted October 8, 2015 i get error in mapserv with parse line in line 1 stoping oninit Quote Link to comment Share on other sites More sharing options...
Elsa Mist Posted October 8, 2015 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 387 Reputation: 60 Joined: 10/08/13 Last Seen: July 14, 2022 Share 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 Link to comment Share on other sites More sharing options...
EL Dragon Posted October 8, 2015 Group: Members Topic Count: 86 Topics Per Day: 0.02 Content Count: 591 Reputation: 146 Joined: 06/19/12 Last Seen: December 10, 2016 Share Posted October 8, 2015 script header - script DayNight -1,{ Quote Link to comment Share on other sites More sharing options...
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 sembiringLink to comment
Share on other sites
7 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.