Jump to content

Recommended Posts

Hello all, I am attempting to create a timer for my players in my scenario that is activated via trigger. So far, I have code that I am using from another post that is fairly old, and there is a problem I have come across not discussed in this post. The post itself can be found here. I get this error upon activating this code:

Line 10, Error select: Type object, expected array, String, Config entry

I've tried everything I can find to fix this and I'm stuck on this one bit. I'm a bit of a newbie when it comes to scripting, so any help is much appreciated. Thanks!

Share this post


Link to post
Share on other sites

To clarify, this is the code which I am using.

/*
Activate by trigger or debug console
       
 nul = [SECONDS] execVM "timer.sqf";

- SECONDS - <NUMBER>: countdown number in seconds 
*/

private "_time";
_time = _this select 0;

while {(_time > 0)} do {
_time = _time - 1; 

// ********* this part is the intermittant images. 
_imgCnd = "";
if (_time % 2 == 0) then {
    _imgCnd = "<img size='5' image= 'images\rocketRed.jpg' align='center'/><br/><br/>";
    } else {
    _imgCnd = "<img size='5' image= 'images\rocketYellow.jpg' align='center'/><br/><br/>";
};
_txtCnd = format["<t font='TahomaB' t size='1.25' t color='#FF0000'>Countdown activated.<br/>Time to launch:<br/><t size='2.25'>%1<br/></t>", [((_time)/60)+.01,"HH:MM"] call BIS_fnc_timetostring];
hintsilent parseText format[_imgCnd + _txtCnd];
// ****************
 
sleep 1;
};

Thanks again!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×