I want to learn JASS from the ground, so I'm doing wyrmlords JASS beginner tutorial (thanks! It's awesome!) Hoever, I fail to make one of his challenges work... It's just some small shit, but I think I should learn everything I can
I guess it has something with handling variables and adding math like the "/"s, I've just scripted in flash before, so I go after those rules
btw, what this function is supposed to do is to show all the numbers that can perfectly split the n integer in the chat.
thanks, /at
JASS:
function DivideNumbers takes integer n returns nothing
local integer split
local string number
set split = 1
loop
if n / split = real then
set number = (n / split)
call BJDebugMsg(number)
set split = split + 1
else
set split = split + 1
exitwhen split > n / 2
endloop
endfunction
I guess it has something with handling variables and adding math like the "/"s, I've just scripted in flash before, so I go after those rules
btw, what this function is supposed to do is to show all the numbers that can perfectly split the n integer in the chat.
thanks, /at
Last edited: