Pascal S Posted May 18, 2014 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 12 Reputation: 2 Joined: 04/15/14 Last Seen: August 8, 2014 Share Posted May 18, 2014 Wie kann ich die bennachrichtigung ausstellen? (aber day & night mode behalten) Quote Link to comment Share on other sites More sharing options...
EL Dragon Posted May 18, 2014 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 May 18, 2014 src/map/pc.c suche : int map_day_timer(int tid, unsigned int tick, int id, intptr_t data) { char tmp_soutput[1024]; if (data == 0 && battle_config.day_duration <= 0) // if we want a day return 0; if (!night_flag) return 0; //Already day. night_flag = 0; // 0=day, 1=night [Yor] map_foreachpc(pc_daynight_timer_sub); strcpy(tmp_soutput, (data == 0) ? msg_txt(NULL,502) : msg_txt(NULL,60)); // The day has arrived! intif_broadcast(tmp_soutput, strlen(tmp_soutput) + 1, 0); return 0; } /*================================================ * timer to do the night [Yor] * data: 0 = called by timer, 1 = gmcommand/script *------------------------------------------------*/ int map_night_timer(int tid, unsigned int tick, int id, intptr_t data) { char tmp_soutput[1024]; if (data == 0 && battle_config.night_duration <= 0) // if we want a night return 0; if (night_flag) return 0; //Already nigth. night_flag = 1; // 0=day, 1=night [Yor] map_foreachpc(pc_daynight_timer_sub); strcpy(tmp_soutput, (data == 0) ? msg_txt(NULL,503) : msg_txt(NULL,59)); // The night has fallen... intif_broadcast(tmp_soutput, strlen(tmp_soutput) + 1, 0); return 0; } Ersetzen durch : int map_day_timer(int tid, unsigned int tick, int id, intptr_t data) { // char tmp_soutput[1024]; if (data == 0 && battle_config.day_duration <= 0) // if we want a day return 0; if (!night_flag) return 0; //Already day. night_flag = 0; // 0=day, 1=night [Yor] map_foreachpc(pc_daynight_timer_sub); // strcpy(tmp_soutput, (data == 0) ? msg_txt(NULL,502) : msg_txt(NULL,60)); // The day has arrived! // intif_broadcast(tmp_soutput, strlen(tmp_soutput) + 1, 0); return 0; } /*================================================ * timer to do the night [Yor] * data: 0 = called by timer, 1 = gmcommand/script *------------------------------------------------*/ int map_night_timer(int tid, unsigned int tick, int id, intptr_t data) { // char tmp_soutput[1024]; if (data == 0 && battle_config.night_duration <= 0) // if we want a night return 0; if (night_flag) return 0; //Already nigth. night_flag = 1; // 0=day, 1=night [Yor] map_foreachpc(pc_daynight_timer_sub); // strcpy(tmp_soutput, (data == 0) ? msg_txt(NULL,503) : msg_txt(NULL,59)); // The night has fallen... // intif_broadcast(tmp_soutput, strlen(tmp_soutput) + 1, 0); return 0; } 1 Quote Link to comment Share on other sites More sharing options...
Pascal S Posted May 21, 2014 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 12 Reputation: 2 Joined: 04/15/14 Last Seen: August 8, 2014 Author Share Posted May 21, 2014 \pc.c(9276): error C2065: 'night_flag': nichtdeklarierter Bezeichner \pc.c(9279): error C2065: 'night_flag': nichtdeklarierter Bezeichner \pc.c(9280): warning C4013: 'map_foreachpc' undefiniert; Annahme: extern mit Rückgabetyp int \pc.c(9296): error C2065: 'night_flag': nichtdeklarierter Bezeichner \pc.c(9299): error C2065: 'night_flag': nichtdeklarierter Bezeichner Quote Link to comment Share on other sites More sharing options...
EL Dragon Posted May 22, 2014 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 May 22, 2014 such mal in pc.c nach strcpy(tmp_soutput, (data == 0) ? msg_txt(502) : msg_txt(60)); // The day has arrived! strcpy(tmp_soutput, (data == 0) ? msg_txt(503) : msg_txt(59)); // The night has fallen... und mach beides raus , danach sollte es eigentlich gehen , nicht vergessen den Server neu zu konfigurieren Quote Link to comment Share on other sites More sharing options...
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.