![]() |
Need help with formula
What is wrong with:
Ability 2 Amount 2 Formula := iif([%Level%] > 3), (([%Level%] - 3) * 2), 0 SE V does not accept it and gives the error message of "incorrect number of parameters for function iif([%Level%] > 3)". I want the Amount of Ability 2 (minesweeping) to be as follows: Level 1 : 0 Level 2 : 0 Level 3 : 0 Level 4 : 2 Level 5 : 4 Level 6 : 6 Thank you for you help. |
Re: Need help with formula
Your parenthesis were not correct.
It should be like this: iif([%Level%] > 3, ([%Level%] - 3) * 2, 0) The general format for iif is: iff(Condition, TRUE, FALSE) |
Re: Need help with formula
Great, that worked. Thank you very much Kwok.
Is there any documentation about the correct syntax of formulas like this one? |
Re: Need help with formula
The formula functions section has this sort of info at the end of modding guide in the docs folder.
|
Re: Need help with formula
Keep in mind that pretty much everything put in the formula fields is an actual function, rather that a flow control keyword as in pretty much every programming language. Everything beyond basic math/boolean operators needs to be used as a function call.
|
Re: Need help with formula
This is why I leave modding SE V to the professionals.
|
Re: Need help with formula
it's not really that hard AT, once you sit down and look at it.
|
All times are GMT -4. The time now is 02:51 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.