Jump to content
Sign in to follow this  
nullsystems

call compile scalar error with array?

Recommended Posts

Quote[/b] ]

limock1 = ["yes","no","yes","no"]

_name = _this select 0;

call compile format ["li%1", _name]

hint format["li%1",_name]

call compile format ["_carli = li%1 select 0;", _name]

~1

hint format["%1",_carli]

exit

//_name is returning mock1, just incase you wondered

Could someone explain why that comes out with scalar bool errors?

I just dont know anyway of storing a selected li%1 array into a variable. Could someone please help.

Thanks in advance

Share this post


Link to post
Share on other sites

It should be something like:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_carli=call compile format ["li%1 select 0", _name];

hint Format ["%1",_carli];

Or like this, depending on how you want to do it:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_carli=ObjNull;

call compile format ["_carli = li%1 select 0", _name]

hint format["%1",_carli];

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  

×