servus , i ch kriege hier einen fehler.
benutze die version 5.0
habe 1 by 1 kopiert.
nachrichten in game werden angezeigt aber leider
macht er kein serverrestart.
wäre sehr nett wenn sie mir helfen würden.
gruß.
17:52:09 Error in expression <p 0 do {
private _times = realTimeSippe select 1;
private _Stunde = _times selec>
17:52:09 Error position: <select 1;
private _Stunde = _times selec>
17:52:09 Error Generic error in expression
17:52:09 File \life_server\Functions\Systems\fn_restart.sqf [TON_fnc_restart]..., line 44
Spoiler anzeigen
/*
author: ԄӏՖҚ
description: Regelt die Restarts.
returns: nothing
*/
waitUntil{!(realTimeSippe isEqualTo [])};
//Set Vars once so they don't get called every time just once.
private _configRestartHours = getArray(missionConfigFile >> "RestartTime" >> "times" >> "RestartTimeHours");
private _configWarnTimeHours = getArray(missionConfigFile >> "RestartTime" >> "times" >> "WarnTimeHours");
private _configWarnTimeMinutes = getArray(missionConfigFile >> "RestartTime" >> "times" >> "WarnTimeMinutes");
private _configText = getArray(missionConfigFile >> "RestartTime" >> "text");
_configRestartHours params [
"_configRestartHoursOne",
"_configRestartHoursTwo",
"_configRestartHoursThree",
"_configRestartHoursFour"
];
_configWarnTimeHours params [
"_warnTimeHourOne",
"_warnTimeHourTwo",
"_warnTimeHourThree",
"_warnTimeHourFour"
];
_configWarnTimeMinutes params [
"_warnTimeMinuteOne",
"_warnTimeMinuteTwo",
"_warnTimeMinuteThree",
"_warnTimeMinuteFour",
"_warnTimeMinuteFive"
];
_configText params[
"_configTextOne",
"_configTextTwo",
"_configTextThree",
"_configTextFour",
"_configTextFive"
];
life_warnOne = true;
life_warnTwo = true;
life_warnThree = true;
life_warnFour = true;
life_warnFive = true;
for "_i" from 0 to 1 step 0 do {
private _times = realTimeSippe select 1;
private _Stunde = _times select 3;
private _Minute = _times select 4;
diag_log "---------------------------";
diag_log format["_Stunde %1 - _Minute %2", _Stunde, _Minute];
if(_Stunde in [_warnTimeHourOne, _warnTimeHourTwo, _warnTimeHourThree, _warnTimeHourFour])then{
//Restart Warn 1
if(_Minute isEqualTo _warnTimeMinuteOne && life_warnOne)then
{
diag_log format["Warn 1: %1 Minute %2", _configTextOne, _warnTimeMinuteOne];
["restart",[_configTextOne]] remoteExecCall ['bis_fnc_showNotification',0];
life_warnOne = false;
};
//Restart Warn 2
if(_Minute isEqualTo _warnTimeMinuteTwo && life_warnTwo)then
{
diag_log format["Warn 2: %1 Minute %2", _configTextTwo, _warnTimeMinuteTwo];
["restart",[_configTextTwo]] remoteExecCall ['bis_fnc_showNotification',0];
life_warnTwo = false;
};
//Restart Warn 3
if(_Minute isEqualTo _warnTimeMinuteThree && life_warnThree)then
{
diag_log format["Warn 3: %1 Minute %2", _configTextThree, _warnTimeMinuteThree];
["restart",[_configTextThree]] remoteExecCall ['bis_fnc_showNotification',0];
life_warnThree = false;
};
//Restart Warn 4
if(_Minute isEqualTo _warnTimeMinuteFour && life_warnFour)then
{
diag_log format["Warn 4: %1 Minute %2", _configTextFour, _warnTimeMinuteFour];
["restart",[_configTextFour]] remoteExecCall ['bis_fnc_showNotification',0];
life_warnFour = false;
};
//Restart Warn 5
if(_Minute isEqualTo _warnTimeMinuteFive && life_warnFive)then
{
diag_log format["Warn 5: %1 Minute %2", _configTextFive, _warnTimeMinuteFive];
["restart",[_configTextFive]] remoteExecCall ['bis_fnc_showNotification',0];
life_warnFive = false;
};
};
//Actual Restart
if(_Stunde in[_configRestartHoursOne,_configRestartHoursTwo,_configRestartHoursThree,_configRestartHoursFour] && _Minute isEqualTo 0)then
{
"dakommtmeinpasswortistklar" serverCommand "#restartserver";
};
diag_log "---------------------------";
sleep 5;
};