View Single Post
Old 01-31-2010, 07:48 PM   #4
TriggerHappy
 
Join Date: Feb 2008
Posts: 405

Submissions (2)

TriggerHappy will become famous soon enough (43)TriggerHappy will become famous soon enough (43)

Default

Should output the lowest #. Not tested (or syntax checked).

Collapse JASS:
local integer i = 1
local integer lowest = yourArray[0]
local integer index  = 0
loop
    exitwhen i > 10
    if (yourArray[i] < lowest) then
        set lowest = yourArray[i]
        set index  = i
    endif
    set i = i + 1
endloop
call BJDebugMsg("yourArray["+I2S(index)+"] has the lowest value, " + I2S(lowest))
TriggerHappy is offline   Reply With Quote