uiox 0 Posted March 18, 2004 I've made a function for test full vehicle: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> private [{_Result },{_Vehicle},{_Unit} ]; _Result = true; _Vehicle =_this select 0; _Unit = {Logic} createvehicle [0,0,0]; _unit moveincargo _Vehicle; if (_unit in _vehicle) then {_Result = false; _Unit action [{EJECT},_Vehicle ];deletevehicle _Unit;} else {_Result = true;deletevehicle _Unit;}; _Result With it I have a random crash bug (directly to desktop) I say random cause it's not first time, but the bug appear after only 2/3 mn maxi. Share this post Link to post Share on other sites
dinger 1 Posted March 19, 2004 Interesting uiox. You realize, of course, that there's nobody competent to answer your level of problem. Perhaps the problem is the EJECT action takes time, and the function happens instantaneously, so the eject action is called, then the unit is deleted, resulting in an action on a nonexistent unit. instead of "deletevehicle _unit", try calling an .sqs with _unit = _this select 0 ~5 deletevehicle _unit and see if it causes a problem. outside of that, I have aucune idee Share this post Link to post Share on other sites
bn880 5 Posted March 19, 2004 Yes also I was speculating perhaps running EJECT action on a createVehicled logic is not a safe bet. Otherwise, are you passing stuff in properly? Share this post Link to post Share on other sites
uiox 0 Posted March 19, 2004 Ok thx. Will try createunit & a while {_unit in _vehicle} do {_unit action {getout}}... For the moment my problem is solved with a count crew hard coded, not a problem it's for known units. Share this post Link to post Share on other sites