GetInputFloat()
From ElectronicWar
| Function information for getInputFloat() | |
| Function | getInputFloat() |
| Parameters | None |
| API | Challenge |
| Cost | $0 |
| Level | N/A |
| CPU Usage | 0 |
| Description | Returns the next float in an array of floats provided by a challenge system. This is one of the functions used to return challenge data (along with getInputString() and getInputInt()) and as such each instance of this function will return the next element in the challenge array. Because of this the challenge data is volatile and should be stored in a variable after each instance. |
[edit] Example
If the challenge input were an array containing three floats, and you had to output the sum of all elements, the script would be:
float f1 = getInputFloat(); float f2 = getInputFloat(); float f3 = getInputFloat(); float f = f1 + f2 + f3; setOutputFloat(f);

