Jump to content
Sign in to follow this  
GreigPil

[Sccript Help] Error damage: Type String, expected Object

Recommended Posts

Hi there,

So I'm working on a mission where a convoy of two vehicles is spawned by radio trigger. These vehicles are called "vic1" and "vic2"; are crewed, given cargo passengers and then move toward their waypoint all in the same script. All this works totally fine. I then have a trigger that is causing me some issues.

The trigger is set up as follows;

condition: ((damage vic1)>0.1) OR ((damage vic2)>0.1);
on activation: hint "Damage";

As soon as the vehicles spawn I get an error;

((damage vic1)>0.1) OR ((|#|damage vic2)>0.1);
Error damage: Type String, expected Object

I don't quite understand what the problem is because when I damage either vehicle, I get the hint "Damage"; which would indicate to me that the trigger does in fact work. Therefore, I think the game is trying to deter me from bad scripting practice: could someone put me on the path to wholesome, clean scripting convention? I'm still new to the whole scripting thing...

Appreciate your help,

GreigPil

Share this post


Link to post
Share on other sites

Sure thing. Here's the script I'm using to spawn everything.

As I said, I'm new to scripting so this is likely a unoptimised workflow. I'm also aware that I'musing both local and global variables - could this be causing any conflicts?

// spawnConvoy.sqf
//
// ERROR MESSAGE
//
// ((damage vic1)>0.1) OR ((|#|damage vic2)>0.1);
// Error damage: Type String, expected Object

_convoySpawn1 = getMarkerPos "convoySpawn1";
_convoySpawn2 = getMarkerPos "convoySpawn2";
_convoyWP1 = getMarkerPos "convoyWP1";
vic1 = "O_APC_Wheeled_02_rcws_F";
vic2 = "O_Truck_02_transport_F";

_grp1 = createGroup east;
_vic1Driver = _grp1 createUnit ["O_crew_F", getMarkerPos "convoySpawn1", [], 0, "NONE"];
_vic1Driver setUnitRank "SERGEANT";
_vic1Gunner = _grp1 createUnit ["O_crew_F", getMarkerPos "convoySpawn1", [], 0, "NONE"];
vic1 = createVehicle [vic1, _convoySpawn1, [], 0, "NONE"];
vic1 setDir 98;
_vic1Driver moveInDriver vic1;
_vic1Gunner moveInGunner vic1;

_wp1 = _grp1 addWaypoint [(getMarkerPos "convoyWP1"), 0];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointSpeed "NORMAL";
_wp1 setWaypointBehaviour "CARELESS";
_wp1 setWaypointCombatMode "GREEN";
_wp1 setWaypointFormation "FILE";
_wp1 setWaypointStatements ["true", ""];

sleep 4;

_vic2Driver = _grp1 createUnit ["O_soldier_repair_F", getMarkerPos "convoySpawn2", [], 0, "FORM"];
vic2 = createVehicle [vic2, _convoySpawn2, [], 0, "NONE"];
vic2 setDir 98;
_vic2Driver moveInDriver vic2;

_grp2 = createGroup east;
_grp2Leader = _grp2 createUnit ["O_Soldier_TL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2Gunner = _grp2 createUnit ["O_Soldier_AR_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2Grndr = _grp2 createUnit ["O_Soldier_GL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2Medic = _grp2 createUnit ["O_medic_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2AT = _grp2 createUnit ["O_Soldier_AT_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];

{_x moveInCargo vic1} forEach units _grp2;

_grp3 = createGroup east;
_grp3Leader = _grp3 createUnit ["O_Soldier_TL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Gunner = _grp3 createUnit ["O_Soldier_AR_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Gunner2 = _grp3 createUnit ["O_Soldier_AR_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Grndr = _grp3 createUnit ["O_Soldier_GL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Grndr2 = _grp3 createUnit ["O_Soldier_GL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Medic = _grp3 createUnit ["O_medic_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3AT = _grp3 createUnit ["O_Soldier_AT_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];

{_x moveInCargo vic2} forEach units _grp3;[/code]


Thanks,

GreigPil

Edited by GreigPil
CODE to PHP tags as suggested

Share this post


Link to post
Share on other sites
Sure thing. Here's the script I'm using to spawn everything.

As I said, I'm new to scripting so this is likely a unoptimised workflow. I'm also aware that I'musing both local and global variables - could this be causing any conflicts?

// spawnConvoy.sqf
//
// ERROR MESSAGE
//
// ((damage vic1)>0.1) OR ((|#|damage vic2)>0.1);
// Error damage: Type String, expected Object

_convoySpawn1 = getMarkerPos "convoySpawn1";
_convoySpawn2 = getMarkerPos "convoySpawn2";
_convoyWP1 = getMarkerPos "convoyWP1";
vic1 = "O_APC_Wheeled_02_rcws_F";
vic2 = "O_Truck_02_transport_F";

_grp1 = createGroup east;
_vic1Driver = _grp1 createUnit ["O_crew_F", getMarkerPos "convoySpawn1", [], 0, "NONE"];
_vic1Driver setUnitRank "SERGEANT";
_vic1Gunner = _grp1 createUnit ["O_crew_F", getMarkerPos "convoySpawn1", [], 0, "NONE"];
vic1 = createVehicle [vic1, _convoySpawn1, [], 0, "NONE"];
vic1 setDir 98;
_vic1Driver moveInDriver vic1;
_vic1Gunner moveInGunner vic1;

_wp1 = _grp1 addWaypoint [(getMarkerPos "convoyWP1"), 0];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointSpeed "NORMAL";
_wp1 setWaypointBehaviour "CARELESS";
_wp1 setWaypointCombatMode "GREEN";
_wp1 setWaypointFormation "FILE";
_wp1 setWaypointStatements ["true", ""];

sleep 4;

_vic2Driver = _grp1 createUnit ["O_soldier_repair_F", getMarkerPos "convoySpawn2", [], 0, "FORM"];
vic2 = createVehicle [vic2, _convoySpawn2, [], 0, "NONE"];
vic2 setDir 98;
_vic2Driver moveInDriver vic2;

_grp2 = createGroup east;
_grp2Leader = _grp2 createUnit ["O_Soldier_TL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2Gunner = _grp2 createUnit ["O_Soldier_AR_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2Grndr = _grp2 createUnit ["O_Soldier_GL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2Medic = _grp2 createUnit ["O_medic_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2AT = _grp2 createUnit ["O_Soldier_AT_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];

{_x moveInCargo vic1} forEach units _grp2;

_grp3 = createGroup east;
_grp3Leader = _grp3 createUnit ["O_Soldier_TL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Gunner = _grp3 createUnit ["O_Soldier_AR_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Gunner2 = _grp3 createUnit ["O_Soldier_AR_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Grndr = _grp3 createUnit ["O_Soldier_GL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Grndr2 = _grp3 createUnit ["O_Soldier_GL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Medic = _grp3 createUnit ["O_medic_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3AT = _grp3 createUnit ["O_Soldier_AT_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];

{_x moveInCargo vic2} forEach units _grp3;

Thanks,

GreigPil

For me it looks like vic1 and vic2 still represent the classnames, that they were defined as at the beginning of the files, thus it says that a string is given instead of an object. If I were you I'd just make the classname variables local and then make the variables for the actual vehicle global. So it should look like this :

// spawnConvoy.sqf
//
// ERROR MESSAGE
//
// ((damage vic1)>0.1) OR ((|#|damage vic2)>0.1);
// Error damage: Type String, expected Object

_convoySpawn1 = getMarkerPos "convoySpawn1";
_convoySpawn2 = getMarkerPos "convoySpawn2";
_convoyWP1 = getMarkerPos "convoyWP1";
_vic1 = "O_APC_Wheeled_02_rcws_F";
_vic2 = "O_Truck_02_transport_F";

_grp1 = createGroup east;
_vic1Driver = _grp1 createUnit ["O_crew_F", getMarkerPos "convoySpawn1", [], 0, "NONE"];
_vic1Driver setUnitRank "SERGEANT";
_vic1Gunner = _grp1 createUnit ["O_crew_F", getMarkerPos "convoySpawn1", [], 0, "NONE"];
vic1 = createVehicle [_vic1, _convoySpawn1, [], 0, "NONE"];
vic1 setDir 98;
_vic1Driver moveInDriver vic1;
_vic1Gunner moveInGunner vic1;

_wp1 = _grp1 addWaypoint [(getMarkerPos "convoyWP1"), 0];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointSpeed "NORMAL";
_wp1 setWaypointBehaviour "CARELESS";
_wp1 setWaypointCombatMode "GREEN";
_wp1 setWaypointFormation "FILE";
_wp1 setWaypointStatements ["true", ""];

sleep 4;

_vic2Driver = _grp1 createUnit ["O_soldier_repair_F", getMarkerPos "convoySpawn2", [], 0, "FORM"];
vic2 = createVehicle [_vic2, _convoySpawn2, [], 0, "NONE"];
vic2 setDir 98;
_vic2Driver moveInDriver vic2;

_grp2 = createGroup east;
_grp2Leader = _grp2 createUnit ["O_Soldier_TL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2Gunner = _grp2 createUnit ["O_Soldier_AR_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2Grndr = _grp2 createUnit ["O_Soldier_GL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2Medic = _grp2 createUnit ["O_medic_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2AT = _grp2 createUnit ["O_Soldier_AT_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];

{_x moveInCargo vic1} forEach units _grp2;

_grp3 = createGroup east;
_grp3Leader = _grp3 createUnit ["O_Soldier_TL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Gunner = _grp3 createUnit ["O_Soldier_AR_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Gunner2 = _grp3 createUnit ["O_Soldier_AR_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Grndr = _grp3 createUnit ["O_Soldier_GL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Grndr2 = _grp3 createUnit ["O_Soldier_GL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Medic = _grp3 createUnit ["O_medic_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3AT = _grp3 createUnit ["O_Soldier_AT_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];

{_x moveInCargo vic2} forEach units _grp3;

That would still leave me clueless as to why the hint appears when you damage the vehicles though.

Edited by FreakJoe

Share this post


Link to post
Share on other sites

Slightly fixed the script using squint, not sure if it will still help with the issue :/

// spawnConvoy.sqf
//
// ERROR MESSAGE
//
// ((damage vic1)>0.1) OR ((|#|damage vic2)>0.1);
// Error damage: Type String, expected Object
private ["_convoySpawn1","_convoySpawn2","_convoyWP1","_vic1","_vic2","_grp1","_vic1Driver","_vic1Gunner","_wp1","_vic2Driver","_grp2","_grp2Leader","_grp2Gunner","_grp2Grndr","_grp2Medic","_grp2AT","_grp3","_grp3Leader","_grp3Gunner","_grp3Gunner2","_grp3Grndr","_grp3Grndr2","_grp3Medic","_grp3AT"];

_convoySpawn1 = getMarkerPos "convoySpawn1";
_convoySpawn2 = getMarkerPos "convoySpawn2";
_convoyWP1 = getMarkerPos "convoyWP1";
_vic1 = "O_APC_Wheeled_02_rcws_F";
_vic2 = "O_Truck_02_transport_F";

_grp1 = createGroup east;
_vic1Driver = _grp1 createUnit ["O_crew_F", getMarkerPos "convoySpawn1", [], 0, "NONE"];
_vic1Driver setUnitRank "SERGEANT";
_vic1Gunner = _grp1 createUnit ["O_crew_F", getMarkerPos "convoySpawn1", [], 0, "NONE"];
vic1 = createVehicle [_vic1, _convoySpawn1, [], 0, "NONE"];
vic1 setDir 98;
_vic1Driver moveInDriver vic1;
_vic1Gunner moveInGunner vic1;

_wp1 = _grp1 addWaypoint [(getMarkerPos "convoyWP1"), 0];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointSpeed "NORMAL";
_wp1 setWaypointBehaviour "CARELESS";
_wp1 setWaypointCombatMode "GREEN";
_wp1 setWaypointFormation "FILE";
_wp1 setWaypointStatements ["true", ""];

sleep 4;

_vic2Driver = _grp1 createUnit ["O_soldier_repair_F", getMarkerPos "convoySpawn2", [], 0, "FORM"];
vic2 = createVehicle [_vic2, _convoySpawn2, [], 0, "NONE"];
vic2 setDir 98;
_vic2Driver moveInDriver vic2;

_grp2 = createGroup east;
_grp2Leader = _grp2 createUnit ["O_Soldier_TL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2Gunner = _grp2 createUnit ["O_Soldier_AR_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2Grndr = _grp2 createUnit ["O_Soldier_GL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2Medic = _grp2 createUnit ["O_medic_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2AT = _grp2 createUnit ["O_Soldier_AT_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];

{_x moveInCargo vic1} forEach units _grp2;

_grp3 = createGroup east;
_grp3Leader = _grp3 createUnit ["O_Soldier_TL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Gunner = _grp3 createUnit ["O_Soldier_AR_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Gunner2 = _grp3 createUnit ["O_Soldier_AR_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Grndr = _grp3 createUnit ["O_Soldier_GL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Grndr2 = _grp3 createUnit ["O_Soldier_GL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Medic = _grp3 createUnit ["O_medic_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3AT = _grp3 createUnit ["O_Soldier_AT_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];

{_x moveInCargo vic2} forEach units _grp3;

Fingers crossed.

PS. When posting a code, instead of using [ CODE] [/code] tags, instead use the [ PHP] [/php] tags as it will improve the formatting of the code and make it easier to read.

Share this post


Link to post
Share on other sites

As I suspected, vic1 was the classname/string instead of the return of createVehicle/spawnVehicle. :)

Share this post


Link to post
Share on other sites

Excellent work, guys! That's solved it. Script and trigger now running error free.

It does look as though, as FreakJoe said, vic1 and 2 represented classnames when defined as a global variable. Switching to local solved it. I had no idea a variable could be defined as local and then referred to as global later in the script - a handy lesson to be had.

Thanks again,

GreigPil

Share this post


Link to post
Share on other sites
I had no idea a variable could be defined as local and then referred to as global later in the script - a handy lesson to be had.

It can't, that's the point. The problem was your original code had vic1 = "classname" which tripped your trigger giving the error but then you reused the vic1 variable name when you spawned the vehicle meaning the trigger would now work.

The code the others did just renamed the first variable to _vic1 so that only the script knew about it and used that in the createVehicle command instead of an unneeded global variable. If you tried something outside of the script to hint _vic1 for example it would fail since globally _vic1 is unknown.

Share this post


Link to post
Share on other sites

Where in relation to this is your trigger spawned? Is this script that is spawning your vehicles threaded in from there ? Looks to me like a slight timing issue as in a script threads in this vehicle spawn other thread starts setting up trigger and trigger is ready before this script gets to change vic2 from class name to actual object. (vic1 doesnt suffer as its created nearly straight away and then there is a 4 second sleep before vic2 is created).

Can try moving actual creation of vic2 towards the top of the script , or set some kind of holding variable for the spawning of your trigger untill the vehicles are ready.

Share this post


Link to post
Share on other sites
It can't, that's the point. The problem was your original code had vic1 = "classname" which tripped your trigger giving the error but then you reused the vic1 variable name when you spawned the vehicle meaning the trigger would now work.

The code the others did just renamed the first variable to _vic1 so that only the script knew about it and used that in the createVehicle command instead of an unneeded global variable. If you tried something outside of the script to hint _vic1 for example it would fail since globally _vic1 is unknown.

Right, that makes more sense. Thanks for explaining. I think if I really want to make a hobby out of scripting missions I need to do some foundation reading first. My brain is totally wired laterally.

Share this post


Link to post
Share on other sites

What a guy. ;)

Edited by GreigPil
habit

Share this post


Link to post
Share on other sites

Glad you got it sorted.

But your error is nothing to do with local/global variables, your original error shows the error on #damage vic2 (if this original error code is correct). Variable vic1 would have failed if it was to do with variable scope.

In changing the code like you have all you have done is masked a timing issue with the creation of your objects (damage nil will not throw an error, and as vic2 is not yet defined now until the creation of the vehicle, so vic2 == nil). Not a large issue but when learning the fundamentals of scripting little things like this can come back to bite you another time.

Infact having an undeclared variable in a trigger may even get you errors once the latest dev build becomes stable as they seem to be stamping out on this behaviour.

Anyway call me pedantic or just an ass what ever thought id bring it to your attention.

Share this post


Link to post
Share on other sites
Glad you got it sorted.

But your error is nothing to do with local/global variables, your original error shows the error on #damage vic2 (if this original error code is correct). Variable vic1 would have failed if it was to do with variable scope.

In changing the code like you have all you have done is masked a timing issue with the creation of your objects (damage nil will not throw an error, and as vic2 is not yet defined now until the creation of the vehicle, so vic2 == nil). Not a large issue but when learning the fundamentals of scripting little things like this can come back to bite you another time.

Infact having an undeclared variable in a trigger may even get you errors once the latest dev build becomes stable as they seem to be stamping out on this behaviour.

Anyway call me pedantic or just an ass what ever thought id bring it to your attention.

Now I understand your point! You're right. I didn't even think of that. You could change your trigger condition to this :

(!(isNil("vehiclesReady")) && (((damage vic1)>0.1) OR ((damage vic2)>0.1)));

and your script to this :

// spawnConvoy.sqf
//
// ERROR MESSAGE
//
// ((damage vic1)>0.1) OR ((|#|damage vic2)>0.1);
// Error damage: Type String, expected Object

_convoySpawn1 = getMarkerPos "convoySpawn1";
_convoySpawn2 = getMarkerPos "convoySpawn2";
_convoyWP1 = getMarkerPos "convoyWP1";
_vic1 = "O_APC_Wheeled_02_rcws_F";
_vic2 = "O_Truck_02_transport_F";

_grp1 = createGroup east;
_vic1Driver = _grp1 createUnit ["O_crew_F", getMarkerPos "convoySpawn1", [], 0, "NONE"];
_vic1Driver setUnitRank "SERGEANT";
_vic1Gunner = _grp1 createUnit ["O_crew_F", getMarkerPos "convoySpawn1", [], 0, "NONE"];
vic1 = createVehicle [_vic1, _convoySpawn1, [], 0, "NONE"];
vic1 setDir 98;
_vic1Driver moveInDriver vic1;
_vic1Gunner moveInGunner vic1;

_wp1 = _grp1 addWaypoint [(getMarkerPos "convoyWP1"), 0];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointSpeed "NORMAL";
_wp1 setWaypointBehaviour "CARELESS";
_wp1 setWaypointCombatMode "GREEN";
_wp1 setWaypointFormation "FILE";
_wp1 setWaypointStatements ["true", ""];

sleep 4;

_vic2Driver = _grp1 createUnit ["O_soldier_repair_F", getMarkerPos "convoySpawn2", [], 0, "FORM"];
vic2 = createVehicle [_vic2, _convoySpawn2, [], 0, "NONE"];
vic2 setDir 98;
_vic2Driver moveInDriver vic2;

_grp2 = createGroup east;
_grp2Leader = _grp2 createUnit ["O_Soldier_TL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2Gunner = _grp2 createUnit ["O_Soldier_AR_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2Grndr = _grp2 createUnit ["O_Soldier_GL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2Medic = _grp2 createUnit ["O_medic_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp2AT = _grp2 createUnit ["O_Soldier_AT_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];

{_x moveInCargo vic1} forEach units _grp2;

_grp3 = createGroup east;
_grp3Leader = _grp3 createUnit ["O_Soldier_TL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Gunner = _grp3 createUnit ["O_Soldier_AR_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Gunner2 = _grp3 createUnit ["O_Soldier_AR_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Grndr = _grp3 createUnit ["O_Soldier_GL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Grndr2 = _grp3 createUnit ["O_Soldier_GL_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3Medic = _grp3 createUnit ["O_medic_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];
_grp3AT = _grp3 createUnit ["O_Soldier_AT_F", getMarkerPos "convoySpawn3", [], 0, "FORM"];

{_x moveInCargo vic2} forEach units _grp3;

vehiclesReady = true;

This way, if vehiclesReady isn't defined (whole script is completed by then), it will just skip the right side of the trigger condition and not throw any errors.

This is untested but should do the job.

Share this post


Link to post
Share on other sites

I didnt think A3 done evaluation like that, i thought it was all or nothing ( lazy eval). To be honest if vic1 was alright for timing before i would just move the creation of vic2 above the 4 second sleep and put it next to vic1's creation, its not like it relies on the group creation, its just an object on its own.

Share this post


Link to post
Share on other sites
I didnt think A3 done evaluation like that, i thought it was all or nothing ( lazy eval).

It does. "Returns true only if both conditions are true. In case of the alternative syntax, lazy evaluation is used (if left operand is false, evaluation of the right side is skipped completely)." (Source: http://community.bistudio.com/wiki/a_%26%26_b)

Share this post


Link to post
Share on other sites
It does. "Returns true only if both conditions are true. In case of the alternative syntax, lazy evaluation is used (if left operand is false, evaluation of the right side is skipped completely)." (Source: http://community.bistudio.com/wiki/a_%26%26_b)

ah ok i see it got fixed

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×