OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: BensTooCool on 30 Mar 2007, 21:07:07
-
I'm rubbish at doing scripts, I got some examples and tutorials but I couldn't get this to work properly, could someone please correct it for me :)
if (ob0==true && obj1==true && obj2==true) then
{
EndGame1 = true;
}
else
{
EndGame2 = true;
};
p.s. I saved it as .sqf and then I loaded the script using a trigger act field "[this] exec file.sqf"
-
And if you call it with:
call { [] exec "file.sqf"; };
or
script = [] exec "file.sqf";
-
I tried call { [] exec "file.sqf"; }; but it still give me the same errors when I executed the script.
-
Did you try the script = ..
and could you write down the errors?
-
[] execVM "whatever.sqf"
-
The error I get is:
'if (obj0|#| == true && obj1|#| == true && obj2|#| == true) then'
Entry, Display (dialog), control
Error: Type, Expexted, Number String object side, group, text, config
I tried script = [] exec "file.sqf"; and [] execVM "whatever.sqf" but that just give me the message Type Nothing, Expected Any
-
got it working :good:
-
isn't using a trigger easier? :confused:
-
if (ob0 && obj1 && obj2) then
{
EndGame1 = true;
}
else
{
EndGame2 = true;
};