Home   Help Search Login Register  

Author Topic: cant get this script to work  (Read 1671 times)

0 Members and 1 Guest are viewing this topic.

Offline BensTooCool

  • Members
  • *
cant get this script to work
« 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  :)

Code: [Select]
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"

Offline Cheetah

  • Former Staff
  • ****
Re: cant get this script to work
« Reply #1 on: 30 Mar 2007, 21:20:15 »
And if you call it with:

call { [] exec "file.sqf"; };

or

script = [] exec "file.sqf";
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline BensTooCool

  • Members
  • *
Re: cant get this script to work
« Reply #2 on: 30 Mar 2007, 21:50:57 »
I tried call { [] exec "file.sqf"; }; but it still give me the same errors when I executed the script.

Offline Cheetah

  • Former Staff
  • ****
Re: cant get this script to work
« Reply #3 on: 30 Mar 2007, 21:53:30 »
Did you try the script = ..
and could you write down the errors?
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: cant get this script to work
« Reply #4 on: 30 Mar 2007, 22:17:42 »
[] execVM "whatever.sqf"

Offline BensTooCool

  • Members
  • *
Re: cant get this script to work
« Reply #5 on: 30 Mar 2007, 22:41:35 »
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

Offline BensTooCool

  • Members
  • *
Re: cant get this script to work
« Reply #6 on: 31 Mar 2007, 01:42:07 »
got it working  :good:

Offline D_P_

  • Members
  • *
  • YAY! I'm a lama again! ...oh wait.
    • ArmaAddons
Re: cant get this script to work
« Reply #7 on: 31 Mar 2007, 03:50:07 »
isn't using a trigger easier?  :confused:
just setpos & forgetpos!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: cant get this script to work
« Reply #8 on: 31 Mar 2007, 04:11:55 »
Code: [Select]
if (ob0 && obj1 && obj2) then
  {
    EndGame1 = true;
  }
else
  {
    EndGame2 = true;
};