Jump to content
Sign in to follow this  
BEAKSBY

How to add text to a path?

Recommended Posts

HI All,

I would like to select the appropriate type of path to generate a correct .paa.

_icon = getText (configfile >> "CfgVehicles" >> typeOf _x >> "icon"); 

returns --> icon = "iconManAT";

but now I wantv add it to "\A3\ui_f\data\map\vehicleicons\ _icon_ca.paa"};

how would I add it to the path?

so it looks like this: "\A3\ui_f\data\map\vehicleicons\iconManAT_ca.paa"};

Share this post


Link to post
Share on other sites

You could use a combination of BIS_fnc_splitString and format to work towards your goal.

Split up the entire path string by backslash, remove the last element in the returned array which would essentially be "_icon_ca.paa" from your first example.

Then you can use format or a simple string addition to put your desired path together.

Share this post


Link to post
Share on other sites
_icon = getText (configfile >> "CfgVehicles" >> typeOf _x >> "icon");  
_iconPath = gettext (configfile >> "cfgvehicleicons" >> _icon);

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  

×