Ok, I just got my script to work and im all happy about it, however, purplepoot just pointed out that my way of doing things are very inefficient and leaks a ton.
So my question is this now, why is it so bad to use BJ functions?
What locations and groups are being leaked? I nulled and destroyed the 3 i'm using. I don't know if this is that inefficient and im just over worrying about it, but my map desynced earlier today and I think this was the cause of it, or it was just comcast cause vent dced :O
JASS:
function kodoattacktarget takes nothing returns nothing
local group g = GetUnitsOfPlayerAll(Player(10))
local group enemies = GetUnitsOfPlayerAll(ForcePickRandomPlayer(GetPlayersAllies(Player(0))))
local unit u
local location loc
loop
set u = FirstOfGroup(g)
exitwhen u == null
call IssueImmediateOrderBJ( u, "stop" )
set loc = GetUnitLoc(GroupPickRandomUnit(enemies))
call IssuePointOrderLocBJ(u , "attack" , loc )
call PingMinimapLocForForce( GetPlayersAll(), loc, 1 )
call GroupRemoveUnit(g, u)
set loc = null
endloop
call DestroyGroup(g)
call DestroyGroup(enemies)
call RemoveLocation(loc)
set g = null
set enemies = null
set loc = null
endfunction
So my question is this now, why is it so bad to use BJ functions?
What locations and groups are being leaked? I nulled and destroyed the 3 i'm using. I don't know if this is that inefficient and im just over worrying about it, but my map desynced earlier today and I think this was the cause of it, or it was just comcast cause vent dced :O