- Joined
- Mar 16, 2008
- Messages
- 955
I don't see anything wrong with syntax here but this code apparently doesn't work. I eventually make this a longer combination that rolls 1-9 but just trying to get the code to work 1-2 first.
JASS:
function SelectHeroes takes nothing returns nothing
local integer roll = GetRandomInt(1,2)
if (roll = 1) then
call SetHero( 1, 'H01G' )
call SetHero( 2, 'H01L' )
elseif (roll = 2) then
call SetHero( 1, 'Hpal' )
call SetHero( 2, 'H01L' )
endif
endfunction