Jump to content
Sign in to follow this  
Griffon2-6

if/else Statements in SQS Files

Recommended Posts

Hi, I'm working on my own private version of Warfare right now, and I've been trying to modify kill bounties so that East gets four times the bounty. All I've done is add "if" and "else" statements around the original line that sets the value of the bounty, and added the *4 modifier:

if (_killerSide == "east") then {

_bounty = (unitBounties Select _index) * BOUNTYMODIFIER * 4;

} else { _bounty = (unitBounties Select _index) * BOUNTYMODIFIER;

};

However, in-game, it always gives me two errors - "Generic error in statement" for the if statement and a syntax error for the else statement.

The _killerSide variable looks strange because it's being set to "east" instead of East, but the variable is initialized as a string, so I'm sure this is correct.

Is there something I'm doing wrong with the if/else statements or is it something else?

Any help would be appreciated.

Share this post


Link to post
Share on other sites

In sqs you can not spread an if/else over multiple lines, you have to put all into one line

Share this post


Link to post
Share on other sites
WHY SQS?!!!

Oh the horror

Why not? It works and is simple to write. When actually playing a mission you won't have any idea which suffix the scripts have.

Share this post


Link to post
Share on other sites
In sqs you can not spread an if/else over multiple lines, you have to put all into one line

Ah ok, that did the trick. Thanks!

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  

×