Home   Help Search Login Register  

Author Topic: END of Mission - Can someone find my missing link?  (Read 2629 times)

0 Members and 2 Guests are viewing this topic.

Offline satexas69

  • Members
  • *
END of Mission - Can someone find my missing link?
« on: 04 Mar 2007, 11:55:22 »
I have 4 objectives in my mission, and they all work as planned, tested.

Each trigger has the following syntax :

Quote
[server, "objective3"] exec "obj.sqs";


Where objective3 is objective0 through objective3.

My obj.sys works great, and changes my marker colors and gives hints as I want...

Code: [Select]
_scriptcall = _this select 1
; ============================================================================
?(_scriptcall == "objective0"):goto "objective0"
?(_scriptcall == "objective1"):goto "objective1"
?(_scriptcall == "objective2"):goto "objective2"
?(_scriptcall == "objective3"):goto "objective3"
; ============================================================================
#objective0
"0" objstatus "DONE"
"Fort_Rooster" setmarkercolor "colorgreen"
hint "Fort Rooster Liberated"
obj0=true; publicVariable "obj0"
exit
; ============================================================================
#objective1
"1" objstatus "DONE"
"Vallejo_Hotel_Marker" setmarkercolor "colorgreen"
hint "Vallejo Hotel Liberated"
obj1=true; publicVariable "obj1"
exit
; ============================================================================
#objective2
"2" objStatus "DONE"
"Rashidah_Marker" setmarkercolor "colorgreen"
hint "Rashidah Liberated"
obj2=true; publicVariable "obj2";
exit
; ============================================================================
#objective3
"3" objStatus "DONE"
"Paraiso_Marker" setmarkercolor "colorgreen"
hint "Paraiso Liberated"
obj3=true; publicVariable "obj3";
exit
; ============================================================================

So far, so good right? Well I can't make it END.. I'm having a syntax boolean error....

On my tigger to see if all are done, and execute the END... here's my problem. I'm TRYING to use this, but get an error:

On Condition :   obj0 && obj1 && obj2 && obj3

What am I doing wrong?

FYI - I got this layout idea from the mission "co30_air_cavalry.Sara" - which uses it, and for the life of me, I can't see why his works, mine doesn't and I'm not newbie  :confused:

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: END of Mission - Can someone find my missing link?
« Reply #1 on: 04 Mar 2007, 13:31:53 »
Hmmm, you cannot use ? in trigger fields, try just putting:

obj0 && obj1 && obj2 && obj3


Planck
I know a little about a lot, and a lot about a little.

Offline Inkompetent

  • Members
  • *
Re: END of Mission - Can someone find my missing link?
« Reply #2 on: 04 Mar 2007, 21:11:12 »
for the boolean error. I get it too when I preview the mission in the editor, but it doesn't seem to affect anything. I can still finish all objectives and finish the mission to debriefing screen, so don't worry about that error message.

Offline satexas69

  • Members
  • *
Re: END of Mission - Can someone find my missing link?
« Reply #3 on: 04 Mar 2007, 21:13:32 »
But the boolean error stays at the top of the screen the whole mission.... annoying as hell :(

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: END of Mission - Can someone find my missing link?
« Reply #4 on: 04 Mar 2007, 22:23:46 »
Did you try what Planck suggested?
For some reason in your post where you have written the Condition: obj0 && obj1 && obj2 && obj3 I see two diamond shaped objects between the : and obj0 with question marks in them so I can't tell whether you have something wrong with it :dry: ..

I just tried the script with all the necessary triggers and all worked just fine without any errors..
The end trigger condition must read only
Quote
obj0 && obj1 && obj2 && obj3
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline satexas69

  • Members
  • *
Re: END of Mission - Can someone find my missing link?
« Reply #5 on: 05 Mar 2007, 08:18:51 »
Yes, I have. Even retyped it fresh, removed all spaces, respaced them, etc.

I get THIS error:

'obj0 |#|&& obj1 && obj2 && obj3'
Error &&: Type Object, Expected Bool

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: END of Mission - Can someone find my missing link?
« Reply #6 on: 05 Mar 2007, 08:30:37 »
put them in brackets.

Code: [Select]
(obj0 and obj1 and obj2 and obj3)

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: END of Mission - Can someone find my missing link?
« Reply #7 on: 05 Mar 2007, 09:42:32 »
Quote
'obj0 |#|&& obj1 && obj2 && obj3'
Error &&: Type Object, Expected Bool
Always post the error messages in the initial post because this says clearly that there's nothing wrong with the trigger condition.

It sounds very much like you have some object (vehicle,soldier,trigger,gamelogic,etc.) named as obj0..
Check if any object has been named obj0, you can do it easily by opening the mission.sqm (from your mission folder) in for example wordpad and using the find tool; use text="obj0" as the keyword to search..
Once you find the object check which unit is is and rename it.

You can tell whether some object is named something by the token text being in the 'definitions', like for example in the below example there is a BLUFOR soldier  named as obj0 on the map
Code: [Select]
    class Item0
{
position[]={2554.511475,13.860000,2520.991455};
id=0;
side="WEST";
vehicle="SoldierWB";
player="PLAYER COMMANDER";
leader=1;
skill=0.600000;
text="obj0";
};
Obviously the token vehicle tells you what kind of object is in question and side tells you on which side it is.

If it is a trigger that is named obj0 it looks something like this
Code: [Select]
class Item0
{
position[]={2582.546875,13.860000,2481.195068};
a=0.000000;
b=0.000000;
interruptable=1;
age="UNKNOWN";
text="obj0";
class Effects
{
};
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: END of Mission - Can someone find my missing link?
« Reply #8 on: 05 Mar 2007, 13:34:09 »
Yes well, I suppose it could be the && are not valid unless in scripts, try bedges method using 'and' instead of '&&'.


Planck
I know a little about a lot, and a lot about a little.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: END of Mission - Can someone find my missing link?
« Reply #9 on: 05 Mar 2007, 21:45:47 »
That's not even an issue..
&& works just fine..

Like I said, I tested this myself and I have no errors and everything works all the way...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline satexas69

  • Members
  • *
Re: END of Mission - Can someone find my missing link?
« Reply #10 on: 06 Mar 2007, 03:18:58 »
H- Nailed it... that's exactly what it was.. 2 of my triggers were named "obj1" and "obj3" (it wasn't obj0 itself, apparently any of those under the qualification would give that exact same error)

Thank you VERY much H-, sometimes it's the obvious stuff that drives you nuts for HOURS.  :laugh:

ISSUE RESOLVED - Feel free to lock this topic.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: END of Mission - Can someone find my missing link?
« Reply #11 on: 06 Mar 2007, 07:05:09 »
You can lock it yourself if you think it is solved.

And you can also re-open it if you find it is not solved after all.


Planck
I know a little about a lot, and a lot about a little.