As for the topic of exiting and switching scopes, also check out the functions 'scopeName', 'breakTo' and 'breakOut' to assign a name to a scope, and selectively breaking from/to a given scope.[/QUOTE]
Originally Posted by (Spinor @ May 17 2007,12:50)
Thanks for that little tidbit.....I never knew that could be done either. I have a long way to go with this stuff.
Just because they do it that way, doesn't make it right.
Originally Posted by [b
Consequently, what I get from you argument is that you are frustrated because you don't want to use either convention (SQS or SQF) as they were intended to be used. This seems a bit anti-progressive to me. You are only setting yourself up for these pitfalls because you want to go Left instead of Up or Down.
No, not frustrated. Both .sqf and .sqs are very good. Its just that .sqs seems to be going away, or they would like us to move tward .sqf format. I just hate to loose capibility while moving ahead.
Originally Posted by (CrashDome @ May 17 2007,14:03)
Your earlyer points are well taken. As I'm learning this stuff I'll have to forget old habits I guess. Again, I'm just a noob at this stuff anyway.
No, we're not losing capability by switching from .sqs to .sqf, only gaining. Any functionality that could have been done with .sqs can now be restructured for .sqf. I find the best thing to do at this point is forget all about .sqs, forget that it ever existed, and start from the ground up with .sqf. It may not be as straight forward or newb-friendly, and it certainly requires more planning, but it's technically superior to .sqs.
Back to the specific topic, there really isn't any technical need to exit in .sqf, an entire .sqf script can be written without exiting if you structure it right, with no less functionality than an .sqs script filled with exits. Also, exitWith fulfills its function, IMO it does just what we need it to, no more, no less.
Originally Posted by Armored_Sheep
The script I was debugging was a script to handle I/O from and to a Dialog box. Therefore it needed to end once the dialog was completed. In the case of the .sqs, exit worked perfectly.
I ended up restructuring the layout and exited the loop without further problems. What I read in the wiki wasn't clear for me, so I expected one thing, and got another. I just need to learn the bounds of the newer format. Several have suggested other methods to use in the .sqf format that I didn't know were available either.
I'll get there some day
We're here to help