Page MenuHomeFeedback Tracker

Script Error when "sleep" in Trigger Activation field
Closed, ResolvedPublic

Description

When you put the sleep command into the activation field for a trigger, you always get "Error 'Generic error' in expression"

The Activation script still seems to work flawless. But it display the error when "showScriptErrors" is on.

Details

Legacy ID
1181733389
Severity
Minor
Resolution
Not A Bug
Reproducibility
Always
Category
Editor
Steps To Reproduce
  1. Start ArmA with parameter "-showScriptErrors"
  2. Go Editor and Place Trigger
  3. Put for example "sleep 3;" into activation code
  4. Go into mission

--> Error displays when trigger is set off.

Event Timeline

dga edited Steps To Reproduce. (Show Details)Mar 10 2013, 7:47 AM
dga edited Additional Information. (Show Details)
dga set Category to Editor.
dga set Reproducibility to Always.
dga set Severity to Minor.
dga set Resolution to Not A Bug.
dga set Legacy ID to 1181733389.May 7 2016, 12:06 PM
Bohemia added a subscriber: dga.Mar 10 2013, 7:47 AM
dga added a comment.Mar 10 2013, 12:04 PM

It seems like, this also happens, when you have a "sleep" in an eventhandler.

From ARMA 2 experience, you cannot use 'sleep' inside a trigger. So I guess this is by design.

If you need to use sleep, then in act field of the trigger, call for an external sqf instead. Or use something like spawn{sleep 1}... I dont know how to use spawn, but vaguely remember someone use it like that.

dga added a comment.Mar 10 2013, 12:39 PM

Well, what you said sounds pretty reasonable.
for example "[] spawn {sleep 2; // do something};" works perfect.

I guess this Issue is nonsense then. My bad.