HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

jass problem (Again)

03-28-2006, 11:36 PM#1
Linera
I get two expected endloop errors

Collapse JASS:
function GetAggro takes handle mob, integer p returns real
  return GetStoredReal(udg_cs_cache, I2S(cs_H2I(mob)), "aggro" + I2S(p))
endfunction

Collapse JASS:
function GetHighestAggro takes handle mob returns integer
local integer p
local integer o
local real aggro

set p = 0
set o = 0
set aggro = 0.00
loop
exitwhen p > 11
If aggro < GetAggro(mob,p) then
   set aggro = GetAggro(mob,p)
   set o = p
endif
set p = p + 1
endloop

return p+1
endfunction
03-29-2006, 12:05 AM#2
aaero
It's not because the I for If is capitalized is it?

If aggro < GetAggro(mob,p) then

should be

if aggro...

Also, O doesn't appear to have a use but I assume that's because this is just a snippet.
03-29-2006, 12:10 AM#3
Linera
thx

rep for you.