Jump to content
Sign in to follow this  
buliwyf

addAction with format

Recommended Posts

Hi..

Is someone able to get following row to work?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_id = _vcl addAction format["[localize ""sometext"",""function.sqf"",[],-1,false];",_tmp];

Stringtable.csv:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sometext,bla %1

confused_o.gif

Share this post


Link to post
Share on other sites
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_id = _vcl addAction format["[localize ""sometext"",""function.sqf"",[],-1,false];",_tmp];

at a quick guess... without testing...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_id = _vcl addAction format["[%1,""function.sqf"",[],0,false,false,""""];",localize _tmp];

PS. you should probably make it 0 (zero) instead of -1 for the priority, also specify all parameters for the addAction command, as it's good coding practice...

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_t = _a addaction [format ["Time - %1",_time],""]

This is how i got it work but not with a stringtable

Share this post


Link to post
Share on other sites

Thanks Junker.. you was on the right way...  thumbs-up.gif

The complete answer is:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_id = _vcl addaction [format [localize "sometext",_tmp],"function.sqf",[],-1,false];

smile_o.gif

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
Sign in to follow this  

×