OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Garcia on 05 Jan 2009, 08:01:56

Title: call compile format...
Post by: Garcia on 05 Jan 2009, 08:01:56
Code: [Select]
call compile format["""Marker_%1"" = createMarker [""Dot"", position player ]",_i];
Get error about missing ';' :dunno:
Title: Re: call compile format...
Post by: bedges on 05 Jan 2009, 09:18:29
Have you tried

Code: [Select]
call compile format["""Marker_%1"" = createMarker [""Dot"", position player ];",_i];
?
Title: Re: call compile format...
Post by: Mandoble on 05 Jan 2009, 13:52:44
Code: [Select]
call compile format["createMarker [""Marker_%1"", position player ];""Marker_%1"" setMarkerType ""Dot""",_i];
Title: Re: call compile format...
Post by: Garcia on 05 Jan 2009, 14:30:35
 :dry:

Cheers...

Somehow I misread "String = createMarker ["name", position]" for "String = createMarker [type, position]" ::)

That's what you get for sitting late trying to script... :blink:
Title: Re: call compile format...
Post by: Spooner on 05 Jan 2009, 19:15:02
Or, avoiding dynamic code entirely (always a good plan!):
Code: [Select]
_marker = createMarker ["Marker_" + str _i, position player];
_marker setMarkerType "Dot";
Title: Re: call compile format...
Post by: Garcia on 05 Jan 2009, 20:46:20
Hmm indeed...

I've got to learn all these new functions they've added...some are quite useful :D