prismpirate
New Member
- Reaction score
- 2
I'm having problems with variables at the moment. If I use an integer for random numbers, my map hangs the moment the map loads. However, if I use a real, the map loads fine. However, GetRandomReal(0,6) can return numbers such as 3.5, something that I would not like to happen.
The function where the problem occurs is found below. It is perfectly fine if I do not have this function in my code. Could someone take a look and see what is wrong?
The function where the problem occurs is found below. It is perfectly fine if I do not have this function in my code. Could someone take a look and see what is wrong?
JASS:
function weatherselection takes nothing returns nothing
local integer tempint = GetRandomInt(0, 6)
if tempint == 0 then
call Reverse()
elseif tempint == 1 then
call Reverse()
call Winter()
elseif tempint == 2 then
call Reverse()
call Thunder()
elseif tempint == 3 then
call Reverse()
call Darkness()
elseif tempint == 4 then
call Reverse()
call Wind()
elseif tempint == 5 then
call Reverse()
call Rain()
endif
endfunction