Jump to content

Recommended Posts

Thanks but what is the need to copy most of the wiki ? If you have something to add, add it on the wiki it will help much more people. Just sayin'

 

The wiki is a categorical mess.

 

Please do not speak of things you do not understand. There is nothing wrong with exitWith and terminate is not an alternative to it.

 

My assumption was was people used if (!isServer) then exitWith {}; if the exitWith was present, and it was the the "main scope" the script

would terminate and do exactly what if (!isServer) then {terminate _thisScript; };

as a valid replacement? And why quickly change the wiki to suit what you wanted?

thats just a little bit suspect?

Nvm looking through bohemias own functions_f folder they make extensive use of exitWith. That information will be removed.

Share this post


Link to post
Share on other sites

And why quickly change the wiki to suit what you wanted?

thats just a little bit suspect?

How else can I win an argument with such an expert in code matters as yourself? Only by changing BIKI to contradict what you are saying, isn't this obvious?

Share this post


Link to post
Share on other sites

Some what a silly, argument to even be had?

but the heavy use of exitWith {} embedded in bohemias own functions, points out it's a valid construct,
code matters? We talking Algorithmic Analysis or just general code? I go what the BIKI says, the fact you bothered, to
change the "wiki" just now, why didn't you change it long before? If it was invalid? The BIKI is what new scriptwriters goto, to find out how to do things,
if it is wrong, it is not my responsibility now is it?

Share this post


Link to post
Share on other sites

Some what a silly, argument to even be had?

but the heavy use of exitWith {} embedded in bohemias own functions, points out it's a valid construct,

code matters? We talking Algorithmic Analysis or just general code? I go what the BIKI says, the fact you bothered, to

change the "wiki" just now, why didn't you change it long before? If it was invalid? The BIKI is what new scriptwriters goto, to find out how to do things,

if it is wrong, it is not my responsibility now is it?

 

One thing you probably don't realise (otherwise you wouldn't be asking these questions) is that source code in Arma is regularly changed and updated, and that after some improvements have been made, the information on BIKI may be out of date. Also this is true, many newcomers use BIKI as bible, but you, you don't have to trust everything what is written on it for the reasons I explained above, and conduct your own experiments if you want to know for sure. Like with terminate for example:

 

[] spawn
{
	if (true) then {terminate _thisScript};
	hint "Oh no, MarkCode82 said this wouldn't show!!11!!1";
};

What is quite strange is that while you do not understand how this works yourself, are already willing to pass your misunderstandings onto others. So I'm asking you, please don't do that.

Share this post


Link to post
Share on other sites

if the exitWith was present, and it was the the "main scope" the script

would terminate and do exactly what if (!isServer) then {terminate _thisScript; };

...

Nvm looking through bohemias own functions_f folder they make extensive use of exitWith. That information will be removed.

What will your terminate _thisScript do when your script is call'ed?

functions_f's functions can't/shouldn't make any assumtions about whether they're call'ed, execVM'ed or spawn'ed, therefore use method that fits more the situation.

Not saying that SQF scripting is a dynamically evolving ecosystem having features appearing and being obsoleted and deprecated every day. And the wiki is a community project, not an officially supported reference. It is what community does with it. If you can do something good for it -- you're welcome, otherwise you can go ... terminate your _thisScript.

Share this post


Link to post
Share on other sites

I already realised a while ago. The terminate is dependent on the scripting engine load and where it is in the queue.

Terminate is delayed, a key distinction I missed.

 

But with that aside, the BIKI being a community project, VBS 3.0 the Australian Fork off Bohemia, get a regularly updating manual. (ArmA 3 sucks :( )

 

The community really should put together a "scripting manual" that can be updated regularly..

https://bisimulations.com/support/manuals

  • Like 1

Share this post


Link to post
Share on other sites

But with that aside, the BIKI being a community project, VBS 3.0 the Australian Fork off Bohemia, get a regularly updating manual. (ArmA 3 sucks :( )

 

The community really should put together a "scripting manual" that can be updated regularly..

https://bisimulations.com/support/manuals

Hopefully you realize that VBS is a real, military training simulation, not the civilian sector equivalent, so yes, I'm sure they will support a manual for that, and even if they don't "truely" keep that manual up-to-date as BIS, I'm sure they have the weight of military personnel (that follow any orders given) to help keep those manuals updated.

And again I state the same thing I did in your other thread, looks like you've got some work to do, you are technically apart of this community, so if you feel something needs to be done or contributed, get it done. I'm sure there are people here willing to assist, should you be willing to take others' input.

Share this post


Link to post
Share on other sites

Again... no create Account button... broken.

 

Or, disabled for a purpose, possibly as a precaution due to the recent security breach! [amended]

Share this post


Link to post
Share on other sites

Some what a silly, argument to even be had?

but the heavy use of exitWith {} embedded in bohemias own functions, points out it's a valid construct,

code matters? We talking Algorithmic Analysis or just general code? I go what the BIKI says, the fact you bothered, to

change the "wiki" just now, why didn't you change it long before? If it was invalid? The BIKI is what new scriptwriters goto, to find out how to do things,

if it is wrong, it is not my responsibility now is it?

I kind of think exitWith should be removed. It's just a really lazy way to break out of a scope. There are few cases where it's beneficial, and with the isServer command (which most people use exitWith to filter server/client) it's not even necessary to break out of a scope when you can have an if statement in the previous scope that prevents all unnecessary cases anyway.

Again... no create Account button... broken.

Try logging in with your forum information. I don't actually remember making an account, but I also used to get drunk every night  :rolleyes:

  • Like 1

Share this post


Link to post
Share on other sites

I kind of think exitWith should be removed. It's just a really lazy way to break out of a scope. There are few cases where it's beneficial, and with the isServer command (which most people use exitWith to filter server/client) it's not even necessary to break out of a scope when you can have an if statement in the previous scope that prevents all unnecessary cases anyway.

Try logging in with your forum information. I don't actually remember making an account, but I also used to get drunk every night  :rolleyes:

if exitWith is faster than if then else and in many cases can be used instead of if then else. Good job you are not in charge of what commands should stay and what should be removed.

Share this post


Link to post
Share on other sites

if exitWith is faster than if then else and in many cases can be used instead of if then else. Good job you are not in charge of what commands should stay and what should be removed.

Thanks for the information, but we could all go without the sass all the time

Share this post


Link to post
Share on other sites

Thanks for the information, but we could all go without the sass all the time

 

Or instead we could provide some examples showing how exitWith fails, so that it doesn't look like we make empty accusations because of some misleading information on exitWith page that has now been removed.

Share this post


Link to post
Share on other sites

Direct Answer from a BIS dev would be nice to clear this all up.

I can certainty imagine BIS dev['s will not have the time to read every forum post/thread. Have you contacted a dev to discuss you issue?

Share this post


Link to post
Share on other sites

One thing you probably don't realise (otherwise you wouldn't be asking these questions) is that source code in Arma is regularly changed and updated, and that after some improvements have been made, the information on BIKI may be out of date. Also this is true, many newcomers use BIKI as bible, but you, you don't have to trust everything what is written on it for the reasons I explained above, and conduct your own experiments if you want to know for sure. Like with terminate for example:

 

[] spawn
{
	if (true) then {terminate _thisScript};
	hint "Oh no, MarkCode82 said this wouldn't show!!11!!1";
};
What is quite strange is that while you do not understand how this works yourself, are already willing to pass your misunderstandings onto others. So I'm asking you, please don't do that.

 

What he's doing seems perfectly understandable. It isn't his fault that the wiki is wrong. And it isn't as if his intention is to convey misinformation.

Using terminate probably isn't a good idea; but, before your updates last week, that wasn't immediately obvious and your code snippet was surprising given the information on the wiki. Maybe a better way for you to respond is to explain why your code example doesn't work as expected and ways to fix it if any. For instance, if I add waitUntil {scriptDone _thisScript} after the terminate command, then it seems to reliably do what was expected of it.

 

It's still probably not a great idea because, as someone mentioned earlier, it behaves differently when a function is called. Maybe a good case for not using terminate is that _thisScript apparently isn't assigned a value when a function is invoked with call and cannot be relied on for an accurate value. For example:

spam =
{
    if (true) then {terminate _thisScript; waitUntil {scriptDone _thisScript}};
    diag_log "This code is never reached.";
    // do stuff ...
};

0 spawn
{
    call spam;
    diag_log "Neither is this even though we didn't terminate anything in this block.";
};

It's more productive when you don't litter your points with humourless sarcasm and snark.

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

×