aozyaman 0 Posted June 19, 2007 Hello, I'm doing a small UH60 limo service script utilizing onMapSingleClick for setting the destination. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if!(local server) exitWith {}; _chopper=_this select 0; if (!(alive _chopper)) exitWith { playSound "beep"; playSound "statik"; [WEST, "AirBase"] sideChat "Helikopter gonderemiyoruz. Basinizin caresine bakin."; playSound "statik"; }; playSound "beep"; playSound "statik"; _chopper sideChat "Alindi. Havalaniyoruz."; sleep 1; _chopper setFuel 1; _base=position _chopper; _helipad="HeliHEmpty" CreateVehicle(position player); [grp_UH60,2] setWaypointPosition [position _helipad,0]; [grp_UH60,2] setWaypointStatements ["true", "chopper1 land ""GET IN"""]; grp_UH60 setCurrentWaypoint [grp_UH60,2]; waitUntil {player in _chopper}; playSound "beep"; playSound "statik"; _chopper sideChat "Nereye gidiyoruz?"; sleep 1; onMapSingleClick ' _marker1 = createMarker ["Inis_Yeri",_pos]; _marker1 setMarkerType "Marker"; _marker1 setMarkerColor "ColorRed"; _chopper sideChat "Anlasildi."; _helipad="HeliHEmpty" CreateVehicle(_pos); [grp_UH60,2] setWaypointPosition [position _helipad,0]; grp_UH60 setCurrentWaypoint [grp_UH60,2]; waitUntil {not (player in _chopper)}; [grp_UH60,2] setWaypointPosition [_base,0]; [grp_UH60,2] setWaypointType "MOVE"; [grp_UH60,2] setWaypointStatements ["true", "chopper1 land ""LAND"""]; grp_UH60 setCurrentWaypoint [grp_UH60,2]; deleteMarker _marker1; playSound "beep"; playSound "statik"; _chopper sideChat "Bol sans."; onMapSingleClick ""; '; I opted to use ' for the OMSC string so as not to hassle with double "" s. The code seems to run fine until it comes to --- Â waitUntil {not (player in _chopper)}; Â --- within the onMapSingleClick block, where it generates a "Generic error in expression" Can someone be so kind as to tell me what is wrong with the onMapSingleClick section of the above code? Any help is greatly appreciated. Share this post Link to post Share on other sites
Op4 BuhBye 0 Posted June 19, 2007 You have an apostrophe at the end of onMapSingleClick. Share this post Link to post Share on other sites
Taurus 20 Posted June 19, 2007 it might be the way you access the .sqf file. Check out mr Ondrej Spanel aka Suma's reply here: http://www.flashpoint1985.com/cgi-bin....=62843; Share this post Link to post Share on other sites
aozyaman 0 Posted June 19, 2007 Thanks for responses. I moved waitUntil out of the onMapSingleClick block and now it works, as in: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">onMapSingleClick ' marker1 = createMarker ["Inis_Yeri",_pos]; marker1 setMarkerType "Marker"; marker1 setMarkerColor "ColorRed"; chopper sideChat "Anlasildi."; helipad="HeliHEmpty" CreateVehicle(_pos); [grp_UH60,2] setWaypointPosition [position helipad,0]; grp_UH60 setCurrentWaypoint [grp_UH60,2]; onMapSingleClick ""; '; waitUntil {not (player in chopper)}; [grp_UH60,2] setWaypointPosition [base,0]; [grp_UH60,2] setWaypointType "MOVE"; [grp_UH60,2] setWaypointStatements ["true", "chopper1 land ""LAND"""]; grp_UH60 setCurrentWaypoint [grp_UH60,2]; deleteMarker marker1; playSound "beep"; playSound "statik"; chopper sideChat "Bol sans."; Perhaps waitUntil just doesn't like to be used within an OMSC string  Share this post Link to post Share on other sites