I need help with this exercise, I've been trying to make the solution, but I get confused with the *10 equation, and the GetRandomInt. Could anyone made that for me please? It impossible for me, although it must be really simple actually, but I can't do it.
For this exercise, you will be using the GetRandomInt native (random number) and I2S native-
JASS:native GetRandomInt takes integer lowBound, integer highBound returns integer
Create a function that sets the values of an array to their indexes * 10 from 1 to a random integer that is anywhere from 1 to 100. So x[10] would be 100 and x[11] would be 110. If you had a max of 5, you'd set x[1]=10, x[2]=20, x[3]=30, x[4]=40, and x[5]=50.
Display the maximum index after completing the loop. You are allowed to use a maximum of 2 variables.
JASS:function Print takes string msg returns nothing call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 60, msg) endfunction
Example Output
Code:Initial max is: 34 Found max is: 34
After completing this, add another variable that stores the initial max and then compare the found max to the initial max. If they are equal, output "Max found" and if they aren't equal, output "Max not found"