setting a parameter of a function to "Arithmetic Operator" results in Syntax Error :(
I wanted to multiply, divide, add or subtract a value depending on some conditions and wanted to give an arithmetic operator to a function. Doesn't seem to work at all. Compiling fails.
I guess it's because operators can't be used as a function parameter in common programming languajes. But you will see there is still some few native functions which uses operators as parameters, such as SetVariable. In these cases, the editor translates these functions into galaxy code. They are not real functions as they are never get called.
I'm not sure if you will be able to get your function working this way. You should check the SetVariable native function and learn how it works. You have to select the "Operator" option for your function. Then take a look at the "Custom Script" slot. You may also want to check how IfThenElse function is made in the trigger editor.
Hi,
setting a parameter of a function to "Arithmetic Operator" results in Syntax Error :(
I wanted to multiply, divide, add or subtract a value depending on some conditions and wanted to give an arithmetic operator to a function. Doesn't seem to work at all. Compiling fails.
I guess it's because operators can't be used as a function parameter in common programming languajes. But you will see there is still some few native functions which uses operators as parameters, such as SetVariable. In these cases, the editor translates these functions into galaxy code. They are not real functions as they are never get called.
I'm not sure if you will be able to get your function working this way. You should check the SetVariable native function and learn how it works. You have to select the "Operator" option for your function. Then take a look at the "Custom Script" slot. You may also want to check how IfThenElse function is made in the trigger editor.