Jump to content
Sign in to follow this  
rwillis

SQF call error and a waypoint question

Recommended Posts

I have a trigger that's set to do this when activated:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">trigger1 = execVM "firstTrigger.sqf";

in which the file firstTrigger.sqf contains:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">? vehicle player != player : hint "Player is in a vehicle";

When the trigger becomes activated it gives me a generic error of having an invalid number in the expression or something.

It DOES work when I use this instead in the trigger when it's activated:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">exec "firstTrigger.sqs";

in which firstTrigger.sqs contains the same exact information as firstTrigger.sqf from above

How do I make it work using the .sqf format?  Is there something else I have to include in the sqf file?

Share this post


Link to post
Share on other sites

You cannot use ? () : shorthand in sqf syntax

It NEEDS to be

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

if (...) then {...};

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  

×