Jump to content
Sign in to follow this  
Guest

Whats wrong with these scripts?

Recommended Posts

Guest

Ok, so I have two scripts here that seem to have problems. If you guys could point out whats wrong them, that would be great:)

So, first one is this:

_smoke="SmokeShellGreen" createVehicle getMarkerPos "smokepos1";_smoke setPos [getPos _smoke select 0,getPos _smoke select 1,25];

It works in the editor but not in multiplayer (Smoke doesn't spawn). Anyone know why?

Second one is:

_unit = reporter;

_posUnit = getPos _unit;
//HeliHEmpty is on Arma2
_invisibleTarget = "HeliHEmpty" createVehicle _posUnit;
_invisibleTarget setPos [(_posUnit select 0)+4000,_posUnit select 1+4000,4000];

_unit doTarget _invisibleTarget;
sleep 1;
_flare_muzzle = "M203Muzzle";
_flare = "FlareGreen_M203";
_unit selectWeapon _flare_muzzle;
_unit fire [_flare_muzzle, _flare_muzzle, _flare];

This one makes the reporter send a green flare into the sky. For some reason this error pops up.. Error: zero divisor, Line 6. Whats that mean? And how to fix it?

Thanks in advance to anyone that helps:)

Share this post


Link to post
Share on other sites
Ok, so I have two scripts here that seem to have problems. If you guys could point out whats wrong them, that would be great:)

So, first one is this:

_smoke="SmokeShellGreen" createVehicle getMarkerPos "smokepos1";_smoke setPos [getPos _smoke select 0,getPos _smoke select 1,25];

It works in the editor but not in multiplayer (Smoke doesn't spawn). Anyone know why?

Second one is:

_unit = reporter;

_posUnit = getPos _unit;
//HeliHEmpty is on Arma2
_invisibleTarget = "HeliHEmpty" createVehicle _posUnit;
_invisibleTarget setPos [(_posUnit select 0)+4000,_posUnit select 1+4000,4000];

_unit doTarget _invisibleTarget;
sleep 1;
_flare_muzzle = "M203Muzzle";
_flare = "FlareGreen_M203";
_unit selectWeapon _flare_muzzle;
_unit fire [_flare_muzzle, _flare_muzzle, _flare];

This one makes the reporter send a green flare into the sky. For some reason this error pops up.. Error: zero divisor, Line 6. Whats that mean? And how to fix it?

Thanks in advance to anyone that helps:)

I think you should use public variable instead of local variable which hasn't underline before each variable.

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  

×