Jump to content
Sign in to follow this  
ArmAriffic

error missing ]

Recommended Posts

init line of the unit

 _null = [this, 1] execVM "deleteUnit.sqf"; 

respawnGer.sqf

 
private ["_grp1"];

_grp1 = createGroup east;

"I44_Man_G_WH_K98k" createUnit [getMarkerPos "respawn_east", _grp1, "_nul = [this, 5] execVM "deleteUnit.sqf""];

deleteUnit.sqf


private ["_Unit","_Delay","_nul"];
_Unit = _this select 0;
_Delay = _this select 1;

waitUntil {not alive _Unit};

sleep _Delay;

deleteVehicle _Unit;

sleep 1;

_nul = [] execVM "respawnGer.sqf";

apparently there is a problem with

"I44_Man_G_WH_K98k" createUnit [getMarkerPos "respawn_east", _grp1, "_nul = [this, 5] execVM "deleteUnit.sqf""]; 

and I am missing a ], can anyone find it? squint says I have no problems there but the unit does not spawn. I get a

 "...east, _grp1, "_null = [this, 5] execVM "|#|deleteUnit.sqf";"]; 

in -showScriptErrors.

PS. There is no classname error, if I remove the execVM deleteUnit the unit spawns (only once though, that's why I need the deleteUnit)

Edited by ArmAriffic

Share this post


Link to post
Share on other sites

Your missing two (")

http://community.bistudio.com/wiki/String

If you want to include double quotes (") in strings enclosed by double quotes, the inside double quotes have to be written twice.

_string = "my string ""with"" quotes"_string2 = 'my other string "with" quotes'

but...

Create unit still works but it is depreciated. You should use createUnit Array

_myguy = _grp1 createUnit ["I44_Man_G_WH_K98k", getMarkerPos "respawn_east"];
_nul = [_myguy, 5] execVM "deleteUnit.sqf";

Edited by Riouken

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  

×