Controlling program flow – Talk
Jump to navigation
Jump to search
mNo edit summary |
Lou Montana (talk | contribs) m (Text replacement - "\[\[Script[ _]syntax\]\]" to "''Script syntax''") |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 10: | Line 10: | ||
:::Changes made to add functions everywhere ;) So it's not script-only. [[User:Whisper|Whisper]] 11:15, 24 July 2006 (CEST) | :::Changes made to add functions everywhere ;) So it's not script-only. [[User:Whisper|Whisper]] 11:15, 24 July 2006 (CEST) | ||
::::It seems the commands have been updated. [[sleep]], [[spawn]] and [[waitUntil]] seem to be [[function]]- | ::::It seems the commands have been updated. [[sleep]], [[spawn]] and [[waitUntil]] seem to be [[Function]]-only | ||
:::::This is probably confusing, but there are two kinds of scripts now - [[Function]] based (which are handled by the [[Script]] type, and Sqs-based (deprecated, see ''Script syntax''). It is definitelly not possible to use [[sleep]] or [[waitUntil]] everywhere, only in the [[Script]]. --[[User:Suma|Suma]] 17:17, 24 July 2006 (CEST) | |||
::::::So if I understand it well, we won't anymore use "exec" but replace it by "spawn"...(provided it can be used in triggers, for example). init.sqs will be function based?[[User:Whisper|Whisper]] 17:35, 24 July 2006 (CEST) | |||
::::::: "It is definitelly not possible to use [[sleep]] or [[waitUntil]] everywhere, only in the [[Script]]." You have function based scripts on mind? --[[User:Djura|Djura]] 19:15, 24 July 2006 (CEST) | |||
:::::::: Seeing the description of sleep : "Suspend execution of '''function based script''' for given time.", I think he does ;) [[User:Whisper|Whisper]] 19:36, 24 July 2006 (CEST) | |||
::::::::: This part of description I have written and I never trust myself. --[[User:Djura|Djura]] 22:04, 24 July 2006 (CEST) |
Latest revision as of 18:45, 21 June 2021
Scripts are deprecated?
I seem to recall having a discussion at the MAPFACT meeting where, in fact, it was acknowledged that scripts were still valid. Does this mean that there are now function commands to pause executing of an .sqf file? The example of an .sqf shows this problem as, A) A WHILE loop executes in the same slice, while the "refueling script" has a half-second delay built it. B) the last I checked, .sqf lines need a semicolon at the end.Dinger 09:38, 24 July 2006 (CEST)
- Just look for sleep-command :), at least that's my understanding of the new Scripting engine; there also things like spawn, which seem to be predestined for asynchronous script execution. --Vektorboson 18:22, 23 July 2006 (CEST)
- perhaps, but those commands refer to Script and not Functions_-_SQF. Indeed, sleep and waitUntil are given as examples of script-only instructions. Dinger 09:38, 24 July 2006 (CEST)
- Changes made to add functions everywhere ;) So it's not script-only. Whisper 11:15, 24 July 2006 (CEST)
- So if I understand it well, we won't anymore use "exec" but replace it by "spawn"...(provided it can be used in triggers, for example). init.sqs will be function based?Whisper 17:35, 24 July 2006 (CEST)
- Seeing the description of sleep : "Suspend execution of function based script for given time.", I think he does ;) Whisper 19:36, 24 July 2006 (CEST)
- This part of description I have written and I never trust myself. --Djura 22:04, 24 July 2006 (CEST)