Jump to content

Recommended Posts

Posted

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;
}
  • Upvote 1
Posted
\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

Posted

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 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...