GetInputInt()

From ElectronicWar

Jump to: navigation, search
Function information for getInputInt()
Function getInputInt()
Parameters None
API Challenge
Cost $0
Level N/A
CPU Usage 0
Description Returns the next integer in an array of integers provided by a challenge system. This is one of the functions used to return challenge data (along with getInputString() and getInputFloat()) 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 (33, 7, 3), and you had to output the sum of all elements, the script would be:

int i1 = getInputInt();
int i2 = getInputInt();
int i3 = getInputInt();
int i = i1 + i2 + i3;
setOutputInt(i);
Personal tools