Jump to content
Sign in to follow this  
snkman

? (random 100 < 50) : exit? In .sqf?

Recommended Posts

Hey guy's,

well i just started converting some script from .sqs to .sqf and now i have a little problem...

How do i convert this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

? (random 100 < 50) : exit

Seem's like there is no way to exit a .sqf script.

I tryed with: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (random 100 < 50) then exitWith {}; but this gives me an error...

Please someone can help me with this?

Share this post


Link to post
Share on other sites

Greate it works wink_o.gif

Thanks a lot Nutty_101.

Share this post


Link to post
Share on other sites

just to add to that.....exitwith dosen't exit the script

if it's in {...} it will just exit that function.

so in the below eg: both exitwith commands execute.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

if(true)then

{

....code....

if(true)exitwith{hint"exit if statment"};

....code....

};

if(true)exitwith{hint"exit script"};

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  

×