uberfoop
~=Admiral Stukov=~
- Reaction score
- 177
If you use them without checking for stuff recycling like Gtam is doing, very much so. Normally, not THAT much, though hashtables, being hashtables, are presumably not entirely watertight.Uh oh, I'm not safe?
Anyway...
This demonstration of system break may be a little overelaborate, because I was trying to twist the map's arm to force it to recycle the id of the first unit I created to a specific unit, but anyway, here's another system break:
JASS:
scope THISBREAKSGTAMSSYSTEM initializer SHAMWOW
globals
unit EL_MAN
unit THE_OTHER_MAN
unit UN_MAN
endglobals
function DISP takes nothing returns nothing
call BJDebugMsg(R2S(GetUnitMovingDistance(UN_MAN)))
endfunction
function LOLWUT takes nothing returns nothing
set UN_MAN = CreateUnit(Player(0),039;hfoo039;,0,0,0)
call RemoveUnit(THE_OTHER_MAN)
call TrackUnitMovement(UN_MAN)
call TimerStart(CreateTimer(),1,true,function DISP)
endfunction
function LOLCATS takes nothing returns nothing
set THE_OTHER_MAN = CreateUnit(Player(0),039;hfoo039;,0,0,0)
call TimerStart(CreateTimer(),1,false,function LOLWUT)
call TrackUnitMovement(THE_OTHER_MAN)
endfunction
function SLAPCHOP takes nothing returns nothing
call RemoveUnit(EL_MAN)
call TimerStart(CreateTimer(),15,false,function LOLCATS)
set EL_MAN=null
endfunction
function SHAMWOW takes nothing returns nothing
set EL_MAN = CreateUnit(Player(0),039;hfoo039;,0,0,0)
call IssuePointOrder(EL_MAN,"move",0,1000)
call TimerStart(CreateTimer(),5,false,function SLAPCHOP)
call TrackUnitMovement(EL_MAN)
endfunction
endscope
Anyway, once again:
¡USE AIDS STRUCTS!