Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: call compile format...  (Read 2198 times)

0 Members and 1 Guest are viewing this topic.

Offline Garcia

  • Members
  • *
  • Leeds United is the best football team...EVER!
call compile format...
« on: 05 Jan 2009, 08:01:56 »
Code: [Select]
call compile format["""Marker_%1"" = createMarker [""Dot"", position player ]",_i];
Get error about missing ';' :dunno:

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: call compile format...
« Reply #1 on: 05 Jan 2009, 09:18:29 »
Have you tried

Code: [Select]
call compile format["""Marker_%1"" = createMarker [""Dot"", position player ];",_i];
?

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: call compile format...
« Reply #2 on: 05 Jan 2009, 13:52:44 »
Code: [Select]
call compile format["createMarker [""Marker_%1"", position player ];""Marker_%1"" setMarkerType ""Dot""",_i];

Offline Garcia

  • Members
  • *
  • Leeds United is the best football team...EVER!
Re: call compile format...
« Reply #3 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:

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: call compile format...
« Reply #4 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";
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Garcia

  • Members
  • *
  • Leeds United is the best football team...EVER!
Re: call compile format...
« Reply #5 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