Centos 7 compile guide
#2

since i can't edit the main post "fix this please"



the helper has an issue with the new gcc48.

It enters a infinite loop causing it to never start.

not even sure how the original code worked honestly without that issue.



 

void CServer::initTime()
{
// Get the current time
time_t now1;
time(&now1);

rankInitUpdateTime = *localtime(&now1);
rewardInitUpdateTime = *localtime(&now1);
rewardEndUpdateTime = *localtime(&now1);

// Increment the day until it is Tuesday (tm_wday = 2)
int daysToAdd = (2 - rankInitUpdateTime.tm_wday + 7) % 7;
rankInitUpdateTime.tm_mday += daysToAdd;
mktime(&rankInitUpdateTime);

// Set the time for rank initialization
rankInitUpdateTime.tm_hour = 8;
rankInitUpdateTime.tm_min = 0;
rankInitUpdateTime.tm_sec = 0;

// Set the time for reward initialization
rewardInitUpdateTime = rankInitUpdateTime;
rewardInitUpdateTime.tm_min = 20;

// Set the time for reward end update
rewardEndUpdateTime = rankInitUpdateTime;
rewardEndUpdateTime.tm_min = 10;

// Set the initial state flags
b_rankinitupdate = false;
b_rewardinitupdate = false;
b_rewardendupdate = false;
}

redo the entire function void CServer::initTime() to this.

inside ServerRun.cpp inside the helper



Messages In This Thread
[No subject] - by pwesty - 06-26-2023, 01:30 PM
[No subject] - by pwesty - 06-27-2023, 01:32 AM
[No subject] - by RGT - 06-27-2023, 06:03 PM
[No subject] - by pwesty - 07-05-2023, 05:23 PM
[No subject] - by Nikolee - 07-24-2023, 07:22 AM
[No subject] - by pwesty - 07-25-2023, 02:38 AM
[No subject] - by Sutz - 12-19-2023, 04:37 PM
[No subject] - by darklord - 01-12-2024, 08:31 PM
[No subject] - by Andrein95 - 04-27-2024, 10:14 AM
[No subject] - by Sutz - 05-14-2024, 09:28 AM
[No subject] - by Sutz - 05-14-2024, 09:36 AM
[No subject] - by Rauni Souza - 12-31-2024, 10:12 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)