Mike31 0 Posted February 20, 2007 Can any one help me with a script problem. When I load my mission up; a error pops up on the top right corner saying this: http://img87.imageshack.us/img87....MG] I found what the error what pointing to but I dont know why it should give me an error. This is a script from OFP I am just converting it to ArmA. Here is the script. _command = _this select 0 _grnum = _this select 1 _group = _this select 2 _dest = _this select 3 _posm = _this select 4 goto _command hint "ERROR" exit #main ? total>=0 : player addAction ["Group1", "bits\gr1.sqs"] ? total>=0 : numacc = numacc +1 ? total>=1 : player addAction ["Group2", "bits\gr2.sqs"] ? total>=1 : numacc = numacc +1 ? total>=2 : player addAction ["Group3", "bits\gr3.sqs"] ? total>=2 : numacc = numacc +1 ? total>=3 : player addAction ["Group4", "bits\gr4.sqs"] ? total>=3 : numacc = numacc +1 ? total>=4 : player addAction ["Group5", "bits\gr5.sqs"] ? total>=4 : numacc = numacc +1 ? total>=5 : player addAction ["Group6", "bits\gr6.sqs"] ? total>=5 : numacc = numacc +1 ? total>=6 : player addAction ["Group7", "bits\gr7.sqs"] ? total>=6 : numacc = numacc +1 ? total>=7 : player addAction ["Group8", "bits\gr8.sqs"] ? total>=7 : numacc = numacc +1 exit #group ? total>=0 : player removeAction numacc ? total>=1 : player removeAction (numacc-1) ? total>=2 : player removeAction (numacc-2) ? total>=3 : player removeAction (numacc-3) ? total>=4 : player removeAction (numacc-4) ? total>=5 : player removeAction (numacc-5) ? total>=6 : player removeAction (numacc-6) ? total>=7 : player removeAction (numacc-7) ? count units _group == 0: goto "dead" player addAction [format ["Group%1 Move", _grnum], format ["bits\grmo%1.sqs", _grnum]] numacc = numacc +1 player addAction [format ["Group%1 Status", _grnum], format ["bits\grst%1.sqs", _grnum]] numacc = numacc +1 player addAction [format ["Group%1 Formation", _grnum], format ["bits\grfo%1.sqs", _grnum]] numacc = numacc +1 player addAction [format ["Group%1 Behaviour", _grnum], format ["bits\grbe%1.sqs", _grnum]] numacc = numacc +1 player addAction [format ["Group%1 CombatMode", _grnum], format ["bits\grco%1.sqs", _grnum]] numacc = numacc +1 player addAction [format ["Group%1 ExitVehicle", _grnum], format ["bits\grex%1.sqs", _grnum]] numacc = numacc +1 exit #form player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) player removeAction (numacc-3) player removeAction (numacc-4) player removeAction (numacc-5) ? count units _group == 0: goto "dead" player addAction [format ["Gr%1 set wedge", _grnum], format ["bits\grfwe%1.sqs", _grnum]] numacc = numacc +1 player addAction [format ["Gr%1 set line",_grnum], format ["bits\grfli%1.sqs", _grnum]] numacc = numacc +1 player addAction [format ["Gr%1 set column",_grnum], format ["bits\grfco%1.sqs", _grnum]] numacc = numacc +1 exit #behav player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) player removeAction (numacc-3) player removeAction (numacc-4) player removeAction (numacc-5) ? count units _group == 0: goto "dead" player addAction [format ["Gr%1 danger!", _grnum], format ["bits\grbco%1.sqs", _grnum]] numacc = numacc +1 player addAction [format ["Gr%1 safe", _grnum], format ["bits\grbsa%1.sqs", _grnum]] numacc = numacc +1 player addAction [format ["Gr%1 stealth", _grnum], format ["bits\grbst%1.sqs", _grnum]] numacc = numacc +1 exit #mode player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) player removeAction (numacc-3) player removeAction (numacc-4) player removeAction (numacc-5) ? count units _group == 0: goto "dead" player addAction [format ["Gr%1 neverfire", _grnum], format ["bits\grcne%1.sqs", _grnum]] numacc = numacc +1 player addAction [format ["Gr%1 holdfire", _grnum], format ["bits\grcho%1.sqs", _grnum]] numacc = numacc +1 player addAction [format ["Gr%1 openfire", _grnum], format ["bits\grcop%1.sqs", _grnum]] numacc = numacc +1 player addAction [format ["Gr%1 engage", _grnum], format ["bits\grcen%1.sqs", _grnum]] numacc = numacc +1 exit ;----------------------------------------------------------------------------------------- -- #move player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) player removeAction (numacc-3) player removeAction (numacc-4) player removeAction (numacc-5) ? count units _group == 0: goto "dead" ? total>=0 : player addAction ["Group1", "bits\gr1.sqs"] ? total>=0 : numacc = numacc +1 ? total>=1 : player addAction ["Group2", "bits\gr2.sqs"] ? total>=1 : numacc = numacc +1 ? total>=2 : player addAction ["Group3", "bits\gr3.sqs"] ? total>=2 : numacc = numacc +1 ? total>=3 : player addAction ["Group4", "bits\gr4.sqs"] ? total>=3 : numacc = numacc +1 ? total>=4 : player addAction ["Group5", "bits\gr5.sqs"] ? total>=4 : numacc = numacc +1 ? total>=5 : player addAction ["Group6", "bits\gr6.sqs"] ? total>=5 : numacc = numacc +1 ? total>=6 : player addAction ["Group7", "bits\gr7.sqs"] ? total>=6 : numacc = numacc +1 ? total>=7 : player addAction ["Group8", "bits\gr8.sqs"] ? total>=7 : numacc = numacc +1 hint format ["Wait for acknowlegement from %1 then click on map", _group] "check1" setMarkerPos getMarkerPos "marker1" _check = getMarkerPos "check1" select 0 #mstart ~2 _lt = leader _group _lt sideChat "Roger, where to?" onMapSingleClick {"marker1" setMarkerPos _pos} _mark = getMarkerPos "marker1" select 0 ? _mark == _check: goto "mstart" _group move getMarkerPos "marker1" _lt sideChat "Moving on" onMapSingleClick {} destset = true @destset _dest setMarkerType "destroy" _dest setMarkerPos getMarkerPos "marker1" #mcheckloop ~5 ? count units _group == 0: goto "mdead" _x1 = getPos _lt select 0 _x2 = getMarkerPos _dest select 0 _y1 = getPos _lt select 1 _y2 = getMarkerPos _dest select 1 _posm setMarkerPos [_x1,_y1] ? (abs(_x1 - _x2) > 10) OR (abs(_y1 - _y2) > 10) : goto "mcheckloop" _lt sideChat "Commander, we're in position" _dest setMarkerType "empty" exit #wedge player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) ? count units _group == 0: goto "dead" _group setFormation "WEDGE" _lt = leader _group _lt sideChat "Roger, wedge formation." goto "main" #line player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) ? count units _group == 0: goto "dead" _group setFormation "LINE" _lt = leader _group _lt sideChat "Roger, line formation." goto "main" #column player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) ? count units _group == 0: goto "dead" _group setFormation "COLUMN" _lt = leader _group _lt sideChat "Roger, column formation." goto "main" #combat player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) ? count units _group == 0: goto "dead" _group setBehaviour "COMBAT" _lt = leader _group _lt sideChat "Roger, we're ready for them." goto "main" #safe player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) ? count units _group == 0: goto "dead" _group setBehaviour "SAFE" _lt = leader _group _lt sideChat "Roger, safe." goto "main" #stealth player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) ? count units _group == 0: goto "dead" _group setBehaviour "STEALTH" _lt = leader _group _lt sideChat "Roger, sneakyness it is." goto "main" #neverfire player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) player removeAction (numacc-3) ? count units _group == 0: goto "dead" _group setCombatMode "BLUE" _lt = leader _group _lt sideChat "Roger. Never fire." goto "main" #holdfire player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) player removeAction (numacc-3) ? count units _group == 0: goto "dead" _group setCombatMode "GREEN" _lt = leader _group _lt sideChat "Roger. Hold fire, defend only." goto "main" #openfire player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) player removeAction (numacc-3) ? count units _group == 0: goto "dead" _group setCombatMode "YELLOW" _lt = leader _group _lt sideChat "Roger. Fire at will." goto "main" #engage player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) player removeAction (numacc-3) ? count units _group == 0: goto "dead" _group setCombatMode "RED" _lt = leader _group _lt sideChat "Roger, engage at will !!" goto "main" #status player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) player removeAction (numacc-3) player removeAction (numacc-4) player removeAction (numacc-5) _dform = formation _group _lt = leader _group _dbehav = behaviour _lt _dmode = combatmode _lt _dsoldiers = count units _group ? _dmode=="BLUE" : _dmode="NEVER FIRE" ? _dmode=="GREEN" : _dmode="HOLD FIRE" ? _dmode=="YELLOW" : _dmode="OPEN FIRE" ? _dmode=="RED" : _dmode="ENGAGE AT WILL" hint format ["Group %1, radio name: %6, behaviour: %2, formation: %3, combatmode: %4, number of units: %5", _grnum, _dbehav, _dform, _dmode, _dsoldiers, _group] goto "main" #exitvehicle player removeAction numacc player removeAction (numacc-1) player removeAction (numacc-2) player removeAction (numacc-3) player removeAction (numacc-4) player removeAction (numacc-5) ? count units _group == 0: goto "dead" _lt = leader _group ? vehicle _lt == _lt : _lt sideChat "We are not in a vehicle !" ? vehicle _lt != _lt : _lt sideChat "Roger. Jumping out."; [_lt] exec "parachute1.sqs" goto "main" #dead _dest setMarkerType "empty" _posm setMarkerType "empty" TitleText [ format ["Group %1 is down. . .", _grnum],"plain down"]; goto "main" #mdead _dest setMarkerType "empty" _posm setMarkerType "empty" TitleText [ format ["Group %1 is down. . .", _grnum],"plain down"]; exit Share this post Link to post Share on other sites
hoz 0 Posted February 20, 2007 moving to mission editing Share this post Link to post Share on other sites