OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Lollypop on 21 May 2009, 18:45:35
-
Hello
I copied some code from a trigger that opens gates when someone gets into trigger area.
But its not working properly: it opens and closes the gate 1st time with an error message "Invalid number in expression" in line 8"
If i try again to open them it stays open..doesnt close again.
can anyone help pls?
i attached the sqf file.
-
~ doesn't work in SQF, use sleep instead.
-
hai..tnx for the reply..
im such a noob...the gates already have a built in open/close you just have to get near them ::)
however for future use..the solution you gave me produced another error a missing ; in line 9 any ideas? :dunno:
-
Each command in SQF has to be determinated with an ;
So you need to add ; to the end of each command.
I can recommend to read the Basic SQF Tutorial (http://www.ofpec.com/ed_depot/index.php?action=details&id=390&game=ArmA)
-
The error is like on the line above the ~5 in sqf has to be replaced with sleep 5;